//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension MediaConnect {
    // MARK: Enums

    public enum Algorithm: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case aes128 = "aes128"
        case aes192 = "aes192"
        case aes256 = "aes256"
        public var description: String { return self.rawValue }
    }

    public enum BridgePlacement: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case available = "AVAILABLE"
        case locked = "LOCKED"
        public var description: String { return self.rawValue }
    }

    public enum BridgeState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case creating = "CREATING"
        case deleted = "DELETED"
        case deleting = "DELETING"
        case deploying = "DEPLOYING"
        case standby = "STANDBY"
        case startFailed = "START_FAILED"
        case startPending = "START_PENDING"
        case starting = "STARTING"
        case stopFailed = "STOP_FAILED"
        case stopping = "STOPPING"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum Colorimetry: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case bt2020 = "BT2020"
        case bt2100 = "BT2100"
        case bt601 = "BT601"
        case bt709 = "BT709"
        case st20651 = "ST2065-1"
        case st20653 = "ST2065-3"
        case xyz = "XYZ"
        public var description: String { return self.rawValue }
    }

    public enum ConnectionStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case connected = "CONNECTED"
        case disconnected = "DISCONNECTED"
        public var description: String { return self.rawValue }
    }

    public enum ContentQualityAnalysisState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum DesiredState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case deleted = "DELETED"
        case standby = "STANDBY"
        public var description: String { return self.rawValue }
    }

    public enum DurationUnits: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case months = "MONTHS"
        public var description: String { return self.rawValue }
    }

    public enum EncoderProfile: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case high = "high"
        case main = "main"
        public var description: String { return self.rawValue }
    }

    public enum EncodingName: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case jxsv = "jxsv"
        case pcm = "pcm"
        case raw = "raw"
        case smpte291 = "smpte291"
        public var description: String { return self.rawValue }
    }

    public enum EntitlementStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum FailoverMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case failover = "FAILOVER"
        case merge = "MERGE"
        public var description: String { return self.rawValue }
    }

    public enum FlowSize: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case large = "LARGE"
        case medium = "MEDIUM"
        public var description: String { return self.rawValue }
    }

    public enum GatewayState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case creating = "CREATING"
        case deleted = "DELETED"
        case deleting = "DELETING"
        case error = "ERROR"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum InstanceState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case deregistered = "DEREGISTERED"
        case deregistering = "DEREGISTERING"
        case deregistrationError = "DEREGISTRATION_ERROR"
        case registering = "REGISTERING"
        case registrationError = "REGISTRATION_ERROR"
        public var description: String { return self.rawValue }
    }

    public enum KeyType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case speke = "speke"
        case srtPassword = "srt-password"
        case staticKey = "static-key"
        public var description: String { return self.rawValue }
    }

    public enum MaintenanceDay: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case friday = "Friday"
        case monday = "Monday"
        case saturday = "Saturday"
        case sunday = "Sunday"
        case thursday = "Thursday"
        case tuesday = "Tuesday"
        case wednesday = "Wednesday"
        public var description: String { return self.rawValue }
    }

    public enum MediaStreamType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case ancillaryData = "ancillary-data"
        case audio = "audio"
        case video = "video"
        public var description: String { return self.rawValue }
    }

    public enum NdiState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum NetworkInterfaceType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case efa = "efa"
        case ena = "ena"
        public var description: String { return self.rawValue }
    }

    public enum OutputStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum PriceUnits: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case hourly = "HOURLY"
        public var description: String { return self.rawValue }
    }

    public enum Range: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case full = "FULL"
        case fullprotect = "FULLPROTECT"
        case narrow = "NARROW"
        public var description: String { return self.rawValue }
    }

    public enum ReservationState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case canceled = "CANCELED"
        case expired = "EXPIRED"
        case processing = "PROCESSING"
        public var description: String { return self.rawValue }
    }

    public enum ResourceType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case mbpsOutboundBandwidth = "Mbps_Outbound_Bandwidth"
        public var description: String { return self.rawValue }
    }

    public enum ScanMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case interlace = "interlace"
        case progressive = "progressive"
        case progressiveSegmentedFrame = "progressive-segmented-frame"
        public var description: String { return self.rawValue }
    }

    public enum SourceType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case entitled = "ENTITLED"
        case owned = "OWNED"
        public var description: String { return self.rawValue }
    }

    public enum State: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum Status: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case deleting = "DELETING"
        case error = "ERROR"
        case standby = "STANDBY"
        case starting = "STARTING"
        case stopping = "STOPPING"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum Tcs: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case bt2100linhlg = "BT2100LINHLG"
        case bt2100linpq = "BT2100LINPQ"
        case density = "DENSITY"
        case hlg = "HLG"
        case linear = "LINEAR"
        case pq = "PQ"
        case sdr = "SDR"
        case st20651 = "ST2065-1"
        case st4281 = "ST428-1"
        public var description: String { return self.rawValue }
    }

    public enum ThumbnailState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum `Protocol`: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cdi = "cdi"
        case fujitsuQos = "fujitsu-qos"
        case ndiSpeedHq = "ndi-speed-hq"
        case rist = "rist"
        case rtp = "rtp"
        case rtpFec = "rtp-fec"
        case srtCaller = "srt-caller"
        case srtListener = "srt-listener"
        case st2110Jpegxs = "st2110-jpegxs"
        case udp = "udp"
        case zixiPull = "zixi-pull"
        case zixiPush = "zixi-push"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AddBridgeFlowSourceRequest: AWSEncodableShape {
        ///  The Amazon Resource Number (ARN) of the flow to use as a source of this bridge.
        public let flowArn: String?
        /// The name of the VPC interface attachment to use for this source.
        public let flowVpcInterfaceAttachment: VpcInterfaceAttachment?
        ///  The name of the flow source. This name is used to reference the source and must be unique among sources in this bridge.
        public let name: String?

        @inlinable
        public init(flowArn: String? = nil, flowVpcInterfaceAttachment: VpcInterfaceAttachment? = nil, name: String? = nil) {
            self.flowArn = flowArn
            self.flowVpcInterfaceAttachment = flowVpcInterfaceAttachment
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case flowVpcInterfaceAttachment = "flowVpcInterfaceAttachment"
            case name = "name"
        }
    }

    public struct AddBridgeNetworkOutputRequest: AWSEncodableShape {
        ///  The network output IP Address.
        public let ipAddress: String?
        ///  The network output name. This name is used to reference the output and must be unique among outputs in this bridge.
        public let name: String?
        ///  The network output's gateway network name.
        public let networkName: String?
        ///  The network output port.
        public let port: Int?
        ///  The network output protocol.   Elemental MediaConnect no longer supports the Fujitsu QoS protocol. This reference is maintained for legacy purposes only.
        public let `protocol`: `Protocol`?
        ///  The network output TTL.
        public let ttl: Int?

        @inlinable
        public init(ipAddress: String? = nil, name: String? = nil, networkName: String? = nil, port: Int? = nil, protocol: `Protocol`? = nil, ttl: Int? = nil) {
            self.ipAddress = ipAddress
            self.name = name
            self.networkName = networkName
            self.port = port
            self.`protocol` = `protocol`
            self.ttl = ttl
        }

        private enum CodingKeys: String, CodingKey {
            case ipAddress = "ipAddress"
            case name = "name"
            case networkName = "networkName"
            case port = "port"
            case `protocol` = "protocol"
            case ttl = "ttl"
        }
    }

    public struct AddBridgeNetworkSourceRequest: AWSEncodableShape {
        ///  The network source multicast IP.
        public let multicastIp: String?
        ///  The settings related to the multicast source.
        public let multicastSourceSettings: MulticastSourceSettings?
        ///  The name of the network source. This name is used to reference the source and must be unique among sources in this bridge.
        public let name: String?
        ///  The network source's gateway network name.
        public let networkName: String?
        ///  The network source port.
        public let port: Int?
        ///  The network source protocol.  Elemental MediaConnect no longer supports the Fujitsu QoS protocol. This reference is maintained for legacy purposes only.
        public let `protocol`: `Protocol`?

        @inlinable
        public init(multicastIp: String? = nil, multicastSourceSettings: MulticastSourceSettings? = nil, name: String? = nil, networkName: String? = nil, port: Int? = nil, protocol: `Protocol`? = nil) {
            self.multicastIp = multicastIp
            self.multicastSourceSettings = multicastSourceSettings
            self.name = name
            self.networkName = networkName
            self.port = port
            self.`protocol` = `protocol`
        }

        private enum CodingKeys: String, CodingKey {
            case multicastIp = "multicastIp"
            case multicastSourceSettings = "multicastSourceSettings"
            case name = "name"
            case networkName = "networkName"
            case port = "port"
            case `protocol` = "protocol"
        }
    }

    public struct AddBridgeOutputRequest: AWSEncodableShape {
        ///  The network output of the bridge. A network output is delivered to your premises.
        public let networkOutput: AddBridgeNetworkOutputRequest?

        @inlinable
        public init(networkOutput: AddBridgeNetworkOutputRequest? = nil) {
            self.networkOutput = networkOutput
        }

        private enum CodingKeys: String, CodingKey {
            case networkOutput = "networkOutput"
        }
    }

    public struct AddBridgeOutputsRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the bridge that you want to update.
        public let bridgeArn: String
        ///  The outputs that you want to add to this bridge.
        public let outputs: [AddBridgeOutputRequest]?

        @inlinable
        public init(bridgeArn: String, outputs: [AddBridgeOutputRequest]? = nil) {
            self.bridgeArn = bridgeArn
            self.outputs = outputs
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.bridgeArn, key: "BridgeArn")
            try container.encodeIfPresent(self.outputs, forKey: .outputs)
        }

        private enum CodingKeys: String, CodingKey {
            case outputs = "outputs"
        }
    }

    public struct AddBridgeOutputsResponse: AWSDecodableShape {
        ///  The ARN of the bridge that you added outputs to.
        public let bridgeArn: String?
        ///  The outputs that you added to this bridge.
        public let outputs: [BridgeOutput]?

        @inlinable
        public init(bridgeArn: String? = nil, outputs: [BridgeOutput]? = nil) {
            self.bridgeArn = bridgeArn
            self.outputs = outputs
        }

        private enum CodingKeys: String, CodingKey {
            case bridgeArn = "bridgeArn"
            case outputs = "outputs"
        }
    }

    public struct AddBridgeSourceRequest: AWSEncodableShape {
        ///  The source of the flow.
        public let flowSource: AddBridgeFlowSourceRequest?
        ///  The source of the network.
        public let networkSource: AddBridgeNetworkSourceRequest?

        @inlinable
        public init(flowSource: AddBridgeFlowSourceRequest? = nil, networkSource: AddBridgeNetworkSourceRequest? = nil) {
            self.flowSource = flowSource
            self.networkSource = networkSource
        }

        private enum CodingKeys: String, CodingKey {
            case flowSource = "flowSource"
            case networkSource = "networkSource"
        }
    }

    public struct AddBridgeSourcesRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the bridge that you want to update.
        public let bridgeArn: String
        ///  The sources that you want to add to this bridge.
        public let sources: [AddBridgeSourceRequest]?

        @inlinable
        public init(bridgeArn: String, sources: [AddBridgeSourceRequest]? = nil) {
            self.bridgeArn = bridgeArn
            self.sources = sources
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.bridgeArn, key: "BridgeArn")
            try container.encodeIfPresent(self.sources, forKey: .sources)
        }

        private enum CodingKeys: String, CodingKey {
            case sources = "sources"
        }
    }

    public struct AddBridgeSourcesResponse: AWSDecodableShape {
        ///  The ARN of the bridge that you added sources to.
        public let bridgeArn: String?
        ///  The sources that you added to this bridge.
        public let sources: [BridgeSource]?

        @inlinable
        public init(bridgeArn: String? = nil, sources: [BridgeSource]? = nil) {
            self.bridgeArn = bridgeArn
            self.sources = sources
        }

        private enum CodingKeys: String, CodingKey {
            case bridgeArn = "bridgeArn"
            case sources = "sources"
        }
    }

    public struct AddEgressGatewayBridgeRequest: AWSEncodableShape {
        ///  The maximum expected bitrate (in bps) of the egress bridge.
        public let maxBitrate: Int?

        @inlinable
        public init(maxBitrate: Int? = nil) {
            self.maxBitrate = maxBitrate
        }

        private enum CodingKeys: String, CodingKey {
            case maxBitrate = "maxBitrate"
        }
    }

    public struct AddFlowMediaStreamsRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the flow.
        public let flowArn: String
        ///  The media streams that you want to add to the flow.
        public let mediaStreams: [AddMediaStreamRequest]?

        @inlinable
        public init(flowArn: String, mediaStreams: [AddMediaStreamRequest]? = nil) {
            self.flowArn = flowArn
            self.mediaStreams = mediaStreams
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.flowArn, key: "FlowArn")
            try container.encodeIfPresent(self.mediaStreams, forKey: .mediaStreams)
        }

        private enum CodingKeys: String, CodingKey {
            case mediaStreams = "mediaStreams"
        }
    }

    public struct AddFlowMediaStreamsResponse: AWSDecodableShape {
        ///  The ARN of the flow that you added media streams to.
        public let flowArn: String?
        ///  The media streams that you added to the flow.
        public let mediaStreams: [MediaStream]?

        @inlinable
        public init(flowArn: String? = nil, mediaStreams: [MediaStream]? = nil) {
            self.flowArn = flowArn
            self.mediaStreams = mediaStreams
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case mediaStreams = "mediaStreams"
        }
    }

    public struct AddFlowOutputsRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the flow that you want to add outputs to.
        public let flowArn: String
        ///  A list of outputs that you want to add to the flow.
        public let outputs: [AddOutputRequest]?

        @inlinable
        public init(flowArn: String, outputs: [AddOutputRequest]? = nil) {
            self.flowArn = flowArn
            self.outputs = outputs
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.flowArn, key: "FlowArn")
            try container.encodeIfPresent(self.outputs, forKey: .outputs)
        }

        private enum CodingKeys: String, CodingKey {
            case outputs = "outputs"
        }
    }

    public struct AddFlowOutputsResponse: AWSDecodableShape {
        ///  The ARN of the flow that these outputs were added to.
        public let flowArn: String?
        ///  The details of the newly added outputs.
        public let outputs: [Output]?

        @inlinable
        public init(flowArn: String? = nil, outputs: [Output]? = nil) {
            self.flowArn = flowArn
            self.outputs = outputs
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case outputs = "outputs"
        }
    }

    public struct AddFlowSourcesRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the flow that you want to update.
        public let flowArn: String
        ///  A list of sources that you want to add to the flow.
        public let sources: [SetSourceRequest]?

        @inlinable
        public init(flowArn: String, sources: [SetSourceRequest]? = nil) {
            self.flowArn = flowArn
            self.sources = sources
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.flowArn, key: "FlowArn")
            try container.encodeIfPresent(self.sources, forKey: .sources)
        }

        private enum CodingKeys: String, CodingKey {
            case sources = "sources"
        }
    }

    public struct AddFlowSourcesResponse: AWSDecodableShape {
        ///  The ARN of the flow that these sources were added to.
        public let flowArn: String?
        ///  The details of the newly added sources.
        public let sources: [Source]?

        @inlinable
        public init(flowArn: String? = nil, sources: [Source]? = nil) {
            self.flowArn = flowArn
            self.sources = sources
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case sources = "sources"
        }
    }

    public struct AddFlowVpcInterfacesRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the flow that you want to update.
        public let flowArn: String
        ///  A list of VPC interfaces that you want to add to the flow.
        public let vpcInterfaces: [VpcInterfaceRequest]?

        @inlinable
        public init(flowArn: String, vpcInterfaces: [VpcInterfaceRequest]? = nil) {
            self.flowArn = flowArn
            self.vpcInterfaces = vpcInterfaces
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.flowArn, key: "FlowArn")
            try container.encodeIfPresent(self.vpcInterfaces, forKey: .vpcInterfaces)
        }

        private enum CodingKeys: String, CodingKey {
            case vpcInterfaces = "vpcInterfaces"
        }
    }

    public struct AddFlowVpcInterfacesResponse: AWSDecodableShape {
        ///  The ARN of the flow that these VPC interfaces were added to.
        public let flowArn: String?
        ///  The details of the newly added VPC interfaces.
        public let vpcInterfaces: [VpcInterface]?

        @inlinable
        public init(flowArn: String? = nil, vpcInterfaces: [VpcInterface]? = nil) {
            self.flowArn = flowArn
            self.vpcInterfaces = vpcInterfaces
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case vpcInterfaces = "vpcInterfaces"
        }
    }

    public struct AddIngressGatewayBridgeRequest: AWSEncodableShape {
        ///  The maximum expected bitrate (in bps) of the ingress bridge.
        public let maxBitrate: Int?
        ///  The maximum number of expected outputs on the ingress bridge.
        public let maxOutputs: Int?

        @inlinable
        public init(maxBitrate: Int? = nil, maxOutputs: Int? = nil) {
            self.maxBitrate = maxBitrate
            self.maxOutputs = maxOutputs
        }

        private enum CodingKeys: String, CodingKey {
            case maxBitrate = "maxBitrate"
            case maxOutputs = "maxOutputs"
        }
    }

    public struct AddMaintenance: AWSEncodableShape {
        ///  A day of a week when the maintenance will happen.
        public let maintenanceDay: MaintenanceDay?
        ///  UTC time when the maintenance will happen.  Use 24-hour HH:MM format.  Minutes must be 00.  Example: 13:00.  The default value is 02:00.
        public let maintenanceStartHour: String?

        @inlinable
        public init(maintenanceDay: MaintenanceDay? = nil, maintenanceStartHour: String? = nil) {
            self.maintenanceDay = maintenanceDay
            self.maintenanceStartHour = maintenanceStartHour
        }

        private enum CodingKeys: String, CodingKey {
            case maintenanceDay = "maintenanceDay"
            case maintenanceStartHour = "maintenanceStartHour"
        }
    }

    public struct AddMediaStreamRequest: AWSEncodableShape {
        ///  The attributes that you want to assign to the new media stream.
        public let attributes: MediaStreamAttributesRequest?
        ///  The sample rate (in Hz) for the stream. If the media stream type is video or ancillary data, set this value to 90000. If the media stream type is audio, set this value to either 48000 or 96000.
        public let clockRate: Int?
        ///  A description that can help you quickly identify what your media stream is used for.
        public let description: String?
        ///  A unique identifier for the media stream.
        public let mediaStreamId: Int?
        ///  A name that helps you distinguish one media stream from another.
        public let mediaStreamName: String?
        ///  The key-value pairs that can be used to tag and organize the media stream.
        public let mediaStreamTags: [String: String]?
        ///  The type of media stream.
        public let mediaStreamType: MediaStreamType?
        ///  The resolution of the video.
        public let videoFormat: String?

        @inlinable
        public init(attributes: MediaStreamAttributesRequest? = nil, clockRate: Int? = nil, description: String? = nil, mediaStreamId: Int? = nil, mediaStreamName: String? = nil, mediaStreamTags: [String: String]? = nil, mediaStreamType: MediaStreamType? = nil, videoFormat: String? = nil) {
            self.attributes = attributes
            self.clockRate = clockRate
            self.description = description
            self.mediaStreamId = mediaStreamId
            self.mediaStreamName = mediaStreamName
            self.mediaStreamTags = mediaStreamTags
            self.mediaStreamType = mediaStreamType
            self.videoFormat = videoFormat
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "attributes"
            case clockRate = "clockRate"
            case description = "description"
            case mediaStreamId = "mediaStreamId"
            case mediaStreamName = "mediaStreamName"
            case mediaStreamTags = "mediaStreamTags"
            case mediaStreamType = "mediaStreamType"
            case videoFormat = "videoFormat"
        }
    }

    public struct AddOutputRequest: AWSEncodableShape {
        ///  The range of IP addresses that should be allowed to initiate output requests to this flow. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
        public let cidrAllowList: [String]?
        ///  A description of the output. This description appears only on the Audit Manager console and will not be seen by the end user.
        public let description: String?
        ///  The IP address from which video will be sent to output destinations.
        public let destination: String?
        ///  The type of key used for the encryption. If no keyType is provided, the service will use the default setting (static-key). Allowable encryption types: static-key.
        public let encryption: Encryption?
        ///  The maximum latency in milliseconds. This parameter applies only to RIST-based and Zixi-based streams.
        public let maxLatency: Int?
        ///  The media streams that are associated with the output, and the parameters for those associations.
        public let mediaStreamOutputConfigurations: [MediaStreamOutputConfigurationRequest]?
        ///  The minimum latency in milliseconds for SRT-based streams. In streams that use the SRT protocol, this value that you set on your MediaConnect source or output represents the minimal potential latency of that connection. The latency of the stream is set to the highest number between the sender’s minimum latency and the receiver’s minimum latency.
        public let minLatency: Int?
        ///  The name of the output. This value must be unique within the current flow.
        public let name: String?
        ///  A suffix for the names of the NDI sources that the flow creates. If a custom name isn't specified, MediaConnect uses the output name.
        public let ndiProgramName: String?
        /// A quality setting for the NDI Speed HQ encoder.
        public let ndiSpeedHqQuality: Int?
        ///  An indication of whether the new output should be enabled or disabled as soon as it is created. If you don't specify the outputStatus field in your request, MediaConnect sets it to ENABLED.
        public let outputStatus: OutputStatus?
        ///  The key-value pairs that can be used to tag and organize the output.
        public let outputTags: [String: String]?
        ///  The port to use when content is distributed to this output.
        public let port: Int?
        ///  The protocol to use for the output.  Elemental MediaConnect no longer supports the Fujitsu QoS protocol. This reference is maintained for legacy purposes only.
        public let `protocol`: `Protocol`?
        ///  The remote ID for the Zixi-pull output stream.
        public let remoteId: String?
        ///  The port that the flow uses to send outbound requests to initiate connection with the sender.
        public let senderControlPort: Int?
        ///  The smoothing latency in milliseconds for RIST, RTP, and RTP-FEC streams.
        public let smoothingLatency: Int?
        ///  The stream ID that you want to use for this transport. This parameter applies only to Zixi and SRT caller-based streams.
        public let streamId: String?
        ///  The name of the VPC interface attachment to use for this output.
        public let vpcInterfaceAttachment: VpcInterfaceAttachment?

        @inlinable
        public init(cidrAllowList: [String]? = nil, description: String? = nil, destination: String? = nil, encryption: Encryption? = nil, maxLatency: Int? = nil, mediaStreamOutputConfigurations: [MediaStreamOutputConfigurationRequest]? = nil, minLatency: Int? = nil, name: String? = nil, ndiProgramName: String? = nil, ndiSpeedHqQuality: Int? = nil, outputStatus: OutputStatus? = nil, outputTags: [String: String]? = nil, port: Int? = nil, protocol: `Protocol`? = nil, remoteId: String? = nil, senderControlPort: Int? = nil, smoothingLatency: Int? = nil, streamId: String? = nil, vpcInterfaceAttachment: VpcInterfaceAttachment? = nil) {
            self.cidrAllowList = cidrAllowList
            self.description = description
            self.destination = destination
            self.encryption = encryption
            self.maxLatency = maxLatency
            self.mediaStreamOutputConfigurations = mediaStreamOutputConfigurations
            self.minLatency = minLatency
            self.name = name
            self.ndiProgramName = ndiProgramName
            self.ndiSpeedHqQuality = ndiSpeedHqQuality
            self.outputStatus = outputStatus
            self.outputTags = outputTags
            self.port = port
            self.`protocol` = `protocol`
            self.remoteId = remoteId
            self.senderControlPort = senderControlPort
            self.smoothingLatency = smoothingLatency
            self.streamId = streamId
            self.vpcInterfaceAttachment = vpcInterfaceAttachment
        }

        private enum CodingKeys: String, CodingKey {
            case cidrAllowList = "cidrAllowList"
            case description = "description"
            case destination = "destination"
            case encryption = "encryption"
            case maxLatency = "maxLatency"
            case mediaStreamOutputConfigurations = "mediaStreamOutputConfigurations"
            case minLatency = "minLatency"
            case name = "name"
            case ndiProgramName = "ndiProgramName"
            case ndiSpeedHqQuality = "ndiSpeedHqQuality"
            case outputStatus = "outputStatus"
            case outputTags = "outputTags"
            case port = "port"
            case `protocol` = "protocol"
            case remoteId = "remoteId"
            case senderControlPort = "senderControlPort"
            case smoothingLatency = "smoothingLatency"
            case streamId = "streamId"
            case vpcInterfaceAttachment = "vpcInterfaceAttachment"
        }
    }

    public struct AudioMonitoringSetting: AWSEncodableShape & AWSDecodableShape {
        ///  Detects periods of silence.
        public let silentAudio: SilentAudio?

        @inlinable
        public init(silentAudio: SilentAudio? = nil) {
            self.silentAudio = silentAudio
        }

        private enum CodingKeys: String, CodingKey {
            case silentAudio = "silentAudio"
        }
    }

    public struct BlackFrames: AWSEncodableShape & AWSDecodableShape {
        ///  Indicates whether the BlackFrames metric is enabled or disabled..
        public let state: State?
        ///  Specifies the number of consecutive seconds of black frames that triggers an event or alert.
        public let thresholdSeconds: Int?

        @inlinable
        public init(state: State? = nil, thresholdSeconds: Int? = nil) {
            self.state = state
            self.thresholdSeconds = thresholdSeconds
        }

        private enum CodingKeys: String, CodingKey {
            case state = "state"
            case thresholdSeconds = "thresholdSeconds"
        }
    }

    public struct Bridge: AWSDecodableShape {
        ///  The Amazon Resource Number (ARN) of the bridge.
        public let bridgeArn: String?
        ///  Messages with details about the bridge.
        public let bridgeMessages: [MessageDetail]?
        /// The state of the bridge.
        public let bridgeState: BridgeState?
        ///  An egress bridge is a cloud-to-ground bridge. The content comes from an existing MediaConnect flow and is delivered to your premises.
        public let egressGatewayBridge: EgressGatewayBridge?
        ///  An ingress bridge is a ground-to-cloud bridge. The content originates at your premises and is delivered to the cloud.
        public let ingressGatewayBridge: IngressGatewayBridge?
        ///  The name of the bridge.
        public let name: String?
        ///  The outputs on this bridge.
        public let outputs: [BridgeOutput]?
        ///  The placement Amazon Resource Number (ARN) of the bridge.
        public let placementArn: String?
        ///  The settings for source failover.
        public let sourceFailoverConfig: FailoverConfig?
        ///  The sources on this bridge.
        public let sources: [BridgeSource]?

        @inlinable
        public init(bridgeArn: String? = nil, bridgeMessages: [MessageDetail]? = nil, bridgeState: BridgeState? = nil, egressGatewayBridge: EgressGatewayBridge? = nil, ingressGatewayBridge: IngressGatewayBridge? = nil, name: String? = nil, outputs: [BridgeOutput]? = nil, placementArn: String? = nil, sourceFailoverConfig: FailoverConfig? = nil, sources: [BridgeSource]? = nil) {
            self.bridgeArn = bridgeArn
            self.bridgeMessages = bridgeMessages
            self.bridgeState = bridgeState
            self.egressGatewayBridge = egressGatewayBridge
            self.ingressGatewayBridge = ingressGatewayBridge
            self.name = name
            self.outputs = outputs
            self.placementArn = placementArn
            self.sourceFailoverConfig = sourceFailoverConfig
            self.sources = sources
        }

        private enum CodingKeys: String, CodingKey {
            case bridgeArn = "bridgeArn"
            case bridgeMessages = "bridgeMessages"
            case bridgeState = "bridgeState"
            case egressGatewayBridge = "egressGatewayBridge"
            case ingressGatewayBridge = "ingressGatewayBridge"
            case name = "name"
            case outputs = "outputs"
            case placementArn = "placementArn"
            case sourceFailoverConfig = "sourceFailoverConfig"
            case sources = "sources"
        }
    }

    public struct BridgeFlowOutput: AWSDecodableShape {
        ///  The Amazon Resource Number (ARN) of the cloud flow.
        public let flowArn: String?
        ///  The Amazon Resource Number (ARN) of the flow source.
        public let flowSourceArn: String?
        ///  The name of the bridge's output.
        public let name: String?

        @inlinable
        public init(flowArn: String? = nil, flowSourceArn: String? = nil, name: String? = nil) {
            self.flowArn = flowArn
            self.flowSourceArn = flowSourceArn
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case flowSourceArn = "flowSourceArn"
            case name = "name"
        }
    }

    public struct BridgeFlowSource: AWSDecodableShape {
        ///  The ARN of the cloud flow used as a source of this bridge.
        public let flowArn: String?
        ///  The name of the VPC interface attachment to use for this source.
        public let flowVpcInterfaceAttachment: VpcInterfaceAttachment?
        ///  The name of the flow source.
        public let name: String?
        ///  The Amazon Resource Number (ARN) of the output.
        public let outputArn: String?

        @inlinable
        public init(flowArn: String? = nil, flowVpcInterfaceAttachment: VpcInterfaceAttachment? = nil, name: String? = nil, outputArn: String? = nil) {
            self.flowArn = flowArn
            self.flowVpcInterfaceAttachment = flowVpcInterfaceAttachment
            self.name = name
            self.outputArn = outputArn
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case flowVpcInterfaceAttachment = "flowVpcInterfaceAttachment"
            case name = "name"
            case outputArn = "outputArn"
        }
    }

    public struct BridgeNetworkOutput: AWSDecodableShape {
        ///  The network output IP address.
        public let ipAddress: String?
        ///  The network output name.
        public let name: String?
        ///  The network output's gateway network name.
        public let networkName: String?
        ///  The network output's port.
        public let port: Int?
        ///  The network output protocol.  Elemental MediaConnect no longer supports the Fujitsu QoS protocol. This reference is maintained for legacy purposes only.
        public let `protocol`: `Protocol`?
        ///  The network output TTL.
        public let ttl: Int?

        @inlinable
        public init(ipAddress: String? = nil, name: String? = nil, networkName: String? = nil, port: Int? = nil, protocol: `Protocol`? = nil, ttl: Int? = nil) {
            self.ipAddress = ipAddress
            self.name = name
            self.networkName = networkName
            self.port = port
            self.`protocol` = `protocol`
            self.ttl = ttl
        }

        private enum CodingKeys: String, CodingKey {
            case ipAddress = "ipAddress"
            case name = "name"
            case networkName = "networkName"
            case port = "port"
            case `protocol` = "protocol"
            case ttl = "ttl"
        }
    }

    public struct BridgeNetworkSource: AWSDecodableShape {
        ///  The network source multicast IP.
        public let multicastIp: String?
        /// The settings related to the multicast source.
        public let multicastSourceSettings: MulticastSourceSettings?
        ///  The name of the network source.
        public let name: String?
        ///  The network source's gateway network name.
        public let networkName: String?
        ///  The network source port.
        public let port: Int?
        ///  The network source protocol.  Elemental MediaConnect no longer supports the Fujitsu QoS protocol. This reference is maintained for legacy purposes only.
        public let `protocol`: `Protocol`?

        @inlinable
        public init(multicastIp: String? = nil, multicastSourceSettings: MulticastSourceSettings? = nil, name: String? = nil, networkName: String? = nil, port: Int? = nil, protocol: `Protocol`? = nil) {
            self.multicastIp = multicastIp
            self.multicastSourceSettings = multicastSourceSettings
            self.name = name
            self.networkName = networkName
            self.port = port
            self.`protocol` = `protocol`
        }

        private enum CodingKeys: String, CodingKey {
            case multicastIp = "multicastIp"
            case multicastSourceSettings = "multicastSourceSettings"
            case name = "name"
            case networkName = "networkName"
            case port = "port"
            case `protocol` = "protocol"
        }
    }

    public struct BridgeOutput: AWSDecodableShape {
        ///  The output of the associated flow.
        public let flowOutput: BridgeFlowOutput?
        ///  The network output for the bridge.
        public let networkOutput: BridgeNetworkOutput?

        @inlinable
        public init(flowOutput: BridgeFlowOutput? = nil, networkOutput: BridgeNetworkOutput? = nil) {
            self.flowOutput = flowOutput
            self.networkOutput = networkOutput
        }

        private enum CodingKeys: String, CodingKey {
            case flowOutput = "flowOutput"
            case networkOutput = "networkOutput"
        }
    }

    public struct BridgeSource: AWSDecodableShape {
        ///  The source of the associated flow.
        public let flowSource: BridgeFlowSource?
        ///  The network source for the bridge.
        public let networkSource: BridgeNetworkSource?

        @inlinable
        public init(flowSource: BridgeFlowSource? = nil, networkSource: BridgeNetworkSource? = nil) {
            self.flowSource = flowSource
            self.networkSource = networkSource
        }

        private enum CodingKeys: String, CodingKey {
            case flowSource = "flowSource"
            case networkSource = "networkSource"
        }
    }

    public struct CreateBridgeRequest: AWSEncodableShape {
        /// An egress bridge is a cloud-to-ground bridge. The content comes from an existing MediaConnect flow and is delivered to your premises.
        public let egressGatewayBridge: AddEgressGatewayBridgeRequest?
        /// An ingress bridge is a ground-to-cloud bridge. The content originates at your premises and is delivered to the cloud.
        public let ingressGatewayBridge: AddIngressGatewayBridgeRequest?
        ///  The name of the bridge. This name can not be modified after the bridge is created.
        public let name: String?
        ///  The outputs that you want to add to this bridge.
        public let outputs: [AddBridgeOutputRequest]?
        ///  The bridge placement Amazon Resource Number (ARN).
        public let placementArn: String?
        ///  The settings for source failover.
        public let sourceFailoverConfig: FailoverConfig?
        ///  The sources that you want to add to this bridge.
        public let sources: [AddBridgeSourceRequest]?

        @inlinable
        public init(egressGatewayBridge: AddEgressGatewayBridgeRequest? = nil, ingressGatewayBridge: AddIngressGatewayBridgeRequest? = nil, name: String? = nil, outputs: [AddBridgeOutputRequest]? = nil, placementArn: String? = nil, sourceFailoverConfig: FailoverConfig? = nil, sources: [AddBridgeSourceRequest]? = nil) {
            self.egressGatewayBridge = egressGatewayBridge
            self.ingressGatewayBridge = ingressGatewayBridge
            self.name = name
            self.outputs = outputs
            self.placementArn = placementArn
            self.sourceFailoverConfig = sourceFailoverConfig
            self.sources = sources
        }

        private enum CodingKeys: String, CodingKey {
            case egressGatewayBridge = "egressGatewayBridge"
            case ingressGatewayBridge = "ingressGatewayBridge"
            case name = "name"
            case outputs = "outputs"
            case placementArn = "placementArn"
            case sourceFailoverConfig = "sourceFailoverConfig"
            case sources = "sources"
        }
    }

    public struct CreateBridgeResponse: AWSDecodableShape {
        ///  The name of the bridge that was created.
        public let bridge: Bridge?

        @inlinable
        public init(bridge: Bridge? = nil) {
            self.bridge = bridge
        }

        private enum CodingKeys: String, CodingKey {
            case bridge = "bridge"
        }
    }

    public struct CreateFlowRequest: AWSEncodableShape {
        ///  The Availability Zone that you want to create the flow in. These options are limited to the Availability Zones within the current Amazon Web Services Region.
        public let availabilityZone: String?
        ///  The entitlements that you want to grant on a flow.
        public let entitlements: [GrantEntitlementRequest]?
        ///  Determines the processing capacity and feature set of the flow. Set this optional parameter to LARGE if you want to enable NDI outputs on the flow.
        public let flowSize: FlowSize?
        ///  The key-value pairs that can be used to tag and organize the flow.
        public let flowTags: [String: String]?
        ///  The maintenance settings you want to use for the flow.
        public let maintenance: AddMaintenance?
        ///  The media streams that you want to add to the flow. You can associate these media streams with sources and outputs on the flow.
        public let mediaStreams: [AddMediaStreamRequest]?
        ///  The name of the flow.
        public let name: String?
        ///  Specifies the configuration settings for NDI outputs. Required when the flow includes NDI outputs.
        public let ndiConfig: NdiConfig?
        ///  The outputs that you want to add to this flow.
        public let outputs: [AddOutputRequest]?
        ///  The settings for the source that you want to use for the new flow.
        public let source: SetSourceRequest?
        ///  The settings for source failover.
        public let sourceFailoverConfig: FailoverConfig?
        ///  The settings for source monitoring.
        public let sourceMonitoringConfig: MonitoringConfig?
        /// The sources that are assigned to the flow.
        public let sources: [SetSourceRequest]?
        ///  The VPC interfaces you want on the flow.
        public let vpcInterfaces: [VpcInterfaceRequest]?

        @inlinable
        public init(availabilityZone: String? = nil, entitlements: [GrantEntitlementRequest]? = nil, flowSize: FlowSize? = nil, flowTags: [String: String]? = nil, maintenance: AddMaintenance? = nil, mediaStreams: [AddMediaStreamRequest]? = nil, name: String? = nil, ndiConfig: NdiConfig? = nil, outputs: [AddOutputRequest]? = nil, source: SetSourceRequest? = nil, sourceFailoverConfig: FailoverConfig? = nil, sourceMonitoringConfig: MonitoringConfig? = nil, sources: [SetSourceRequest]? = nil, vpcInterfaces: [VpcInterfaceRequest]? = nil) {
            self.availabilityZone = availabilityZone
            self.entitlements = entitlements
            self.flowSize = flowSize
            self.flowTags = flowTags
            self.maintenance = maintenance
            self.mediaStreams = mediaStreams
            self.name = name
            self.ndiConfig = ndiConfig
            self.outputs = outputs
            self.source = source
            self.sourceFailoverConfig = sourceFailoverConfig
            self.sourceMonitoringConfig = sourceMonitoringConfig
            self.sources = sources
            self.vpcInterfaces = vpcInterfaces
        }

        private enum CodingKeys: String, CodingKey {
            case availabilityZone = "availabilityZone"
            case entitlements = "entitlements"
            case flowSize = "flowSize"
            case flowTags = "flowTags"
            case maintenance = "maintenance"
            case mediaStreams = "mediaStreams"
            case name = "name"
            case ndiConfig = "ndiConfig"
            case outputs = "outputs"
            case source = "source"
            case sourceFailoverConfig = "sourceFailoverConfig"
            case sourceMonitoringConfig = "sourceMonitoringConfig"
            case sources = "sources"
            case vpcInterfaces = "vpcInterfaces"
        }
    }

    public struct CreateFlowResponse: AWSDecodableShape {
        ///  The flow that you created.
        public let flow: Flow?

        @inlinable
        public init(flow: Flow? = nil) {
            self.flow = flow
        }

        private enum CodingKeys: String, CodingKey {
            case flow = "flow"
        }
    }

    public struct CreateGatewayRequest: AWSEncodableShape {
        ///  The range of IP addresses that are allowed to contribute content or initiate output requests for flows communicating with this gateway. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
        public let egressCidrBlocks: [String]?
        ///  The name of the gateway. This name can not be modified after the gateway is created.
        public let name: String?
        ///  The list of networks that you want to add to the gateway.
        public let networks: [GatewayNetwork]?

        @inlinable
        public init(egressCidrBlocks: [String]? = nil, name: String? = nil, networks: [GatewayNetwork]? = nil) {
            self.egressCidrBlocks = egressCidrBlocks
            self.name = name
            self.networks = networks
        }

        private enum CodingKeys: String, CodingKey {
            case egressCidrBlocks = "egressCidrBlocks"
            case name = "name"
            case networks = "networks"
        }
    }

    public struct CreateGatewayResponse: AWSDecodableShape {
        ///  The gateway that you created.
        public let gateway: Gateway?

        @inlinable
        public init(gateway: Gateway? = nil) {
            self.gateway = gateway
        }

        private enum CodingKeys: String, CodingKey {
            case gateway = "gateway"
        }
    }

    public struct DeleteBridgeRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the bridge that you want to delete.
        public let bridgeArn: String

        @inlinable
        public init(bridgeArn: String) {
            self.bridgeArn = bridgeArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.bridgeArn, key: "BridgeArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteBridgeResponse: AWSDecodableShape {
        ///  The ARN of the deleted bridge.
        public let bridgeArn: String?

        @inlinable
        public init(bridgeArn: String? = nil) {
            self.bridgeArn = bridgeArn
        }

        private enum CodingKeys: String, CodingKey {
            case bridgeArn = "bridgeArn"
        }
    }

    public struct DeleteFlowRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the flow that you want to delete.
        public let flowArn: String

        @inlinable
        public init(flowArn: String) {
            self.flowArn = flowArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.flowArn, key: "FlowArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteFlowResponse: AWSDecodableShape {
        ///  The ARN of the flow that was deleted.
        public let flowArn: String?
        ///  The status of the flow when the DeleteFlow process begins.
        public let status: Status?

        @inlinable
        public init(flowArn: String? = nil, status: Status? = nil) {
            self.flowArn = flowArn
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case status = "status"
        }
    }

    public struct DeleteGatewayRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the gateway that you want to delete.
        public let gatewayArn: String

        @inlinable
        public init(gatewayArn: String) {
            self.gatewayArn = gatewayArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.gatewayArn, key: "GatewayArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteGatewayResponse: AWSDecodableShape {
        ///  The ARN of the gateway that was deleted.
        public let gatewayArn: String?

        @inlinable
        public init(gatewayArn: String? = nil) {
            self.gatewayArn = gatewayArn
        }

        private enum CodingKeys: String, CodingKey {
            case gatewayArn = "gatewayArn"
        }
    }

    public struct DeregisterGatewayInstanceRequest: AWSEncodableShape {
        ///  Force the deregistration of an instance. Force will deregister an instance, even if there are bridges running on it.
        public let force: Bool?
        ///  The Amazon Resource Name (ARN) of the gateway that contains the instance that you want to deregister.
        public let gatewayInstanceArn: String

        @inlinable
        public init(force: Bool? = nil, gatewayInstanceArn: String) {
            self.force = force
            self.gatewayInstanceArn = gatewayInstanceArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.force, key: "force")
            request.encodePath(self.gatewayInstanceArn, key: "GatewayInstanceArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeregisterGatewayInstanceResponse: AWSDecodableShape {
        ///  The ARN of the instance.
        public let gatewayInstanceArn: String?
        ///  The status of the instance.
        public let instanceState: InstanceState?

        @inlinable
        public init(gatewayInstanceArn: String? = nil, instanceState: InstanceState? = nil) {
            self.gatewayInstanceArn = gatewayInstanceArn
            self.instanceState = instanceState
        }

        private enum CodingKeys: String, CodingKey {
            case gatewayInstanceArn = "gatewayInstanceArn"
            case instanceState = "instanceState"
        }
    }

    public struct DescribeBridgeRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the bridge that you want to describe.
        public let bridgeArn: String

        @inlinable
        public init(bridgeArn: String) {
            self.bridgeArn = bridgeArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.bridgeArn, key: "BridgeArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeBridgeResponse: AWSDecodableShape {
        /// The bridge that you requested a description of.
        public let bridge: Bridge?

        @inlinable
        public init(bridge: Bridge? = nil) {
            self.bridge = bridge
        }

        private enum CodingKeys: String, CodingKey {
            case bridge = "bridge"
        }
    }

    public struct DescribeFlowRequest: AWSEncodableShape {
        ///  The ARN of the flow that you want to describe.
        public let flowArn: String

        @inlinable
        public init(flowArn: String) {
            self.flowArn = flowArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.flowArn, key: "FlowArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeFlowResponse: AWSDecodableShape {
        /// The flow that you requested a description of.
        public let flow: Flow?
        ///  Any errors that apply currently to the flow. If there are no errors, MediaConnect will not include this field in the response.
        public let messages: Messages?

        @inlinable
        public init(flow: Flow? = nil, messages: Messages? = nil) {
            self.flow = flow
            self.messages = messages
        }

        private enum CodingKeys: String, CodingKey {
            case flow = "flow"
            case messages = "messages"
        }
    }

    public struct DescribeFlowSourceMetadataRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the flow.
        public let flowArn: String

        @inlinable
        public init(flowArn: String) {
            self.flowArn = flowArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.flowArn, key: "FlowArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeFlowSourceMetadataResponse: AWSDecodableShape {
        ///  The ARN of the flow that DescribeFlowSourceMetadata was performed on.
        public let flowArn: String?
        ///  Provides a status code and message regarding issues found with the flow source metadata.
        public let messages: [MessageDetail]?
        ///  The timestamp of the most recent change in metadata for this flow’s source.
        public let timestamp: Date?
        ///  Information about the flow's transport media.
        public let transportMediaInfo: TransportMediaInfo?

        @inlinable
        public init(flowArn: String? = nil, messages: [MessageDetail]? = nil, timestamp: Date? = nil, transportMediaInfo: TransportMediaInfo? = nil) {
            self.flowArn = flowArn
            self.messages = messages
            self.timestamp = timestamp
            self.transportMediaInfo = transportMediaInfo
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case messages = "messages"
            case timestamp = "timestamp"
            case transportMediaInfo = "transportMediaInfo"
        }
    }

    public struct DescribeFlowSourceThumbnailRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the flow.
        public let flowArn: String

        @inlinable
        public init(flowArn: String) {
            self.flowArn = flowArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.flowArn, key: "FlowArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeFlowSourceThumbnailResponse: AWSDecodableShape {
        /// The details of the thumbnail, including thumbnail base64 string, timecode and the time when thumbnail was generated.
        public let thumbnailDetails: ThumbnailDetails?

        @inlinable
        public init(thumbnailDetails: ThumbnailDetails? = nil) {
            self.thumbnailDetails = thumbnailDetails
        }

        private enum CodingKeys: String, CodingKey {
            case thumbnailDetails = "thumbnailDetails"
        }
    }

    public struct DescribeGatewayInstanceRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the gateway instance that you want to describe.
        public let gatewayInstanceArn: String

        @inlinable
        public init(gatewayInstanceArn: String) {
            self.gatewayInstanceArn = gatewayInstanceArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.gatewayInstanceArn, key: "GatewayInstanceArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeGatewayInstanceResponse: AWSDecodableShape {
        /// The gateway instance that you requested a description of.
        public let gatewayInstance: GatewayInstance?

        @inlinable
        public init(gatewayInstance: GatewayInstance? = nil) {
            self.gatewayInstance = gatewayInstance
        }

        private enum CodingKeys: String, CodingKey {
            case gatewayInstance = "gatewayInstance"
        }
    }

    public struct DescribeGatewayRequest: AWSEncodableShape {
        ///  The ARN of the gateway that you want to describe.
        public let gatewayArn: String

        @inlinable
        public init(gatewayArn: String) {
            self.gatewayArn = gatewayArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.gatewayArn, key: "GatewayArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeGatewayResponse: AWSDecodableShape {
        /// The gateway that you wanted to describe.
        public let gateway: Gateway?

        @inlinable
        public init(gateway: Gateway? = nil) {
            self.gateway = gateway
        }

        private enum CodingKeys: String, CodingKey {
            case gateway = "gateway"
        }
    }

    public struct DescribeOfferingRequest: AWSEncodableShape {
        ///  The ARN of the offering.
        public let offeringArn: String

        @inlinable
        public init(offeringArn: String) {
            self.offeringArn = offeringArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.offeringArn, key: "OfferingArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeOfferingResponse: AWSDecodableShape {
        /// The offering that you requested a description of.
        public let offering: Offering?

        @inlinable
        public init(offering: Offering? = nil) {
            self.offering = offering
        }

        private enum CodingKeys: String, CodingKey {
            case offering = "offering"
        }
    }

    public struct DescribeReservationRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the offering.
        public let reservationArn: String

        @inlinable
        public init(reservationArn: String) {
            self.reservationArn = reservationArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.reservationArn, key: "ReservationArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeReservationResponse: AWSDecodableShape {
        ///  A pricing agreement for a discounted rate for a specific outbound bandwidth that your MediaConnect account will use each month over a specific time period. The discounted rate in the reservation applies to outbound bandwidth for all flows from your account until your account reaches the amount of bandwidth in your reservation. If you use more outbound bandwidth than the agreed upon amount in a single month, the overage is charged at the on-demand rate.
        public let reservation: Reservation?

        @inlinable
        public init(reservation: Reservation? = nil) {
            self.reservation = reservation
        }

        private enum CodingKeys: String, CodingKey {
            case reservation = "reservation"
        }
    }

    public struct DestinationConfiguration: AWSDecodableShape {
        /// The IP address where you want MediaConnect to send contents of the media stream.
        public let destinationIp: String?
        ///  The port that you want MediaConnect to use when it distributes the media stream to the output.
        public let destinationPort: Int?
        ///  The VPC interface that you want to use for the media stream associated with the output.
        public let interface: Interface?
        /// The IP address that the receiver requires in order to establish a connection with the flow. This value is represented by the elastic network interface IP address of the VPC. This field applies only to outputs that use the CDI or ST 2110 JPEG XS or protocol.
        public let outboundIp: String?

        @inlinable
        public init(destinationIp: String? = nil, destinationPort: Int? = nil, interface: Interface? = nil, outboundIp: String? = nil) {
            self.destinationIp = destinationIp
            self.destinationPort = destinationPort
            self.interface = interface
            self.outboundIp = outboundIp
        }

        private enum CodingKeys: String, CodingKey {
            case destinationIp = "destinationIp"
            case destinationPort = "destinationPort"
            case interface = "interface"
            case outboundIp = "outboundIp"
        }
    }

    public struct DestinationConfigurationRequest: AWSEncodableShape {
        /// The IP address where you want MediaConnect to send contents of the media stream.
        public let destinationIp: String?
        ///  The port that you want MediaConnect to use when it distributes the media stream to the output.
        public let destinationPort: Int?
        ///  The VPC interface that you want to use for the media stream associated with the output.
        public let interface: InterfaceRequest?

        @inlinable
        public init(destinationIp: String? = nil, destinationPort: Int? = nil, interface: InterfaceRequest? = nil) {
            self.destinationIp = destinationIp
            self.destinationPort = destinationPort
            self.interface = interface
        }

        private enum CodingKeys: String, CodingKey {
            case destinationIp = "destinationIp"
            case destinationPort = "destinationPort"
            case interface = "interface"
        }
    }

    public struct EgressGatewayBridge: AWSDecodableShape {
        ///  The ID of the instance running this bridge.
        public let instanceId: String?
        ///  The maximum expected bitrate (in bps) of the egress bridge.
        public let maxBitrate: Int?

        @inlinable
        public init(instanceId: String? = nil, maxBitrate: Int? = nil) {
            self.instanceId = instanceId
            self.maxBitrate = maxBitrate
        }

        private enum CodingKeys: String, CodingKey {
            case instanceId = "instanceId"
            case maxBitrate = "maxBitrate"
        }
    }

    public struct EncodingParameters: AWSDecodableShape {
        ///  A value that is used to calculate compression for an output. The bitrate of the output is calculated as follows: Output bitrate = (1 / compressionFactor) * (source bitrate) This property only applies to outputs that use the ST 2110 JPEG XS protocol, with a flow source that uses the CDI protocol. Valid values are floating point numbers in the range of 3.0 to 10.0, inclusive.
        public let compressionFactor: Double?
        ///  A setting on the encoder that drives compression settings. This property only applies to video media streams associated with outputs that use the ST 2110 JPEG XS protocol, with a flow source that uses the CDI protocol.
        public let encoderProfile: EncoderProfile?

        @inlinable
        public init(compressionFactor: Double? = nil, encoderProfile: EncoderProfile? = nil) {
            self.compressionFactor = compressionFactor
            self.encoderProfile = encoderProfile
        }

        private enum CodingKeys: String, CodingKey {
            case compressionFactor = "compressionFactor"
            case encoderProfile = "encoderProfile"
        }
    }

    public struct EncodingParametersRequest: AWSEncodableShape {
        ///  A value that is used to calculate compression for an output. The bitrate of the output is calculated as follows: Output bitrate = (1 / compressionFactor) * (source bitrate) This property only applies to outputs that use the ST 2110 JPEG XS protocol, with a flow source that uses the CDI protocol. Valid values are floating point numbers in the range of 3.0 to 10.0, inclusive.
        public let compressionFactor: Double?
        ///  A setting on the encoder that drives compression settings. This property only applies to video media streams associated with outputs that use the ST 2110 JPEG XS protocol, if at least one source on the flow uses the CDI protocol.
        public let encoderProfile: EncoderProfile?

        @inlinable
        public init(compressionFactor: Double? = nil, encoderProfile: EncoderProfile? = nil) {
            self.compressionFactor = compressionFactor
            self.encoderProfile = encoderProfile
        }

        private enum CodingKeys: String, CodingKey {
            case compressionFactor = "compressionFactor"
            case encoderProfile = "encoderProfile"
        }
    }

    public struct Encryption: AWSEncodableShape & AWSDecodableShape {
        ///  The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256).
        public let algorithm: Algorithm?
        ///  A 128-bit, 16-byte hex value represented by a 32-character string, to be used with the key for encrypting content. This parameter is not valid for static key encryption.
        public let constantInitializationVector: String?
        ///  The value of one of the devices that you configured with your digital rights management (DRM) platform key provider. This parameter is required for SPEKE encryption and is not valid for static key encryption.
        public let deviceId: String?
        ///  The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key).
        public let keyType: KeyType?
        ///  The Amazon Web Services Region that the API Gateway proxy endpoint was created in. This parameter is required for SPEKE encryption and is not valid for static key encryption.
        public let region: String?
        ///  An identifier for the content. The service sends this value to the key server to identify the current endpoint. The resource ID is also known as the content ID. This parameter is required for SPEKE encryption and is not valid for static key encryption.
        public let resourceId: String?
        ///  The ARN of the role that you created during setup (when you set up MediaConnect as a trusted entity).
        public let roleArn: String?
        ///  The ARN of the secret that you created in Secrets Manager to store the encryption key. This parameter is required for static key encryption and is not valid for SPEKE encryption.
        public let secretArn: String?
        ///  The URL from the API Gateway proxy that you set up to talk to your key server. This parameter is required for SPEKE encryption and is not valid for static key encryption.
        public let url: String?

        @inlinable
        public init(algorithm: Algorithm? = nil, constantInitializationVector: String? = nil, deviceId: String? = nil, keyType: KeyType? = nil, region: String? = nil, resourceId: String? = nil, roleArn: String? = nil, secretArn: String? = nil, url: String? = nil) {
            self.algorithm = algorithm
            self.constantInitializationVector = constantInitializationVector
            self.deviceId = deviceId
            self.keyType = keyType
            self.region = region
            self.resourceId = resourceId
            self.roleArn = roleArn
            self.secretArn = secretArn
            self.url = url
        }

        private enum CodingKeys: String, CodingKey {
            case algorithm = "algorithm"
            case constantInitializationVector = "constantInitializationVector"
            case deviceId = "deviceId"
            case keyType = "keyType"
            case region = "region"
            case resourceId = "resourceId"
            case roleArn = "roleArn"
            case secretArn = "secretArn"
            case url = "url"
        }
    }

    public struct Entitlement: AWSDecodableShape {
        ///  Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
        public let dataTransferSubscriberFeePercent: Int?
        ///  A description of the entitlement.
        public let description: String?
        ///  The type of encryption that will be used on the output that is associated with this entitlement.
        public let encryption: Encryption?
        ///  The ARN of the entitlement.
        public let entitlementArn: String?
        ///  An indication of whether the entitlement is enabled.
        public let entitlementStatus: EntitlementStatus?
        ///  The name of the entitlement.
        public let name: String?
        ///  The Amazon Web Services account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source.
        public let subscribers: [String]?

        @inlinable
        public init(dataTransferSubscriberFeePercent: Int? = nil, description: String? = nil, encryption: Encryption? = nil, entitlementArn: String? = nil, entitlementStatus: EntitlementStatus? = nil, name: String? = nil, subscribers: [String]? = nil) {
            self.dataTransferSubscriberFeePercent = dataTransferSubscriberFeePercent
            self.description = description
            self.encryption = encryption
            self.entitlementArn = entitlementArn
            self.entitlementStatus = entitlementStatus
            self.name = name
            self.subscribers = subscribers
        }

        private enum CodingKeys: String, CodingKey {
            case dataTransferSubscriberFeePercent = "dataTransferSubscriberFeePercent"
            case description = "description"
            case encryption = "encryption"
            case entitlementArn = "entitlementArn"
            case entitlementStatus = "entitlementStatus"
            case name = "name"
            case subscribers = "subscribers"
        }
    }

    public struct FailoverConfig: AWSEncodableShape & AWSDecodableShape {
        ///  The type of failover you choose for this flow. MERGE combines the source streams into a single stream, allowing graceful recovery from any single-source loss. FAILOVER allows switching between different streams.
        public let failoverMode: FailoverMode?
        ///  Search window time to look for dash-7 packets.
        public let recoveryWindow: Int?
        ///  The priority you want to assign to a source. You can have a primary stream and a backup stream or two equally prioritized streams.
        public let sourcePriority: SourcePriority?
        /// The state of source failover on the flow. If the state is inactive, the flow can have only one source. If the state is active, the flow can have one or two sources.
        public let state: State?

        @inlinable
        public init(failoverMode: FailoverMode? = nil, recoveryWindow: Int? = nil, sourcePriority: SourcePriority? = nil, state: State? = nil) {
            self.failoverMode = failoverMode
            self.recoveryWindow = recoveryWindow
            self.sourcePriority = sourcePriority
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case failoverMode = "failoverMode"
            case recoveryWindow = "recoveryWindow"
            case sourcePriority = "sourcePriority"
            case state = "state"
        }
    }

    public struct Flow: AWSDecodableShape {
        ///  The Availability Zone that you want to create the flow in. These options are limited to the Availability Zones within the current Amazon Web Services Region.
        public let availabilityZone: String?
        ///  A description of the flow. This value is not used or seen outside of the current MediaConnect account.
        public let description: String?
        ///  The IP address from which video will be sent to output destinations.
        public let egressIp: String?
        ///  The entitlements in this flow.
        public let entitlements: [Entitlement]?
        ///  The Amazon Resource Name (ARN) of the flow.
        public let flowArn: String?
        ///  Determines the processing capacity and feature set of the flow. Set this optional parameter to LARGE if you want to enable NDI outputs on the flow.
        public let flowSize: FlowSize?
        ///  The maintenance settings for the flow.
        public let maintenance: Maintenance?
        ///  The media streams that are associated with the flow. After you associate a media stream with a source, you can also associate it with outputs on the flow.
        public let mediaStreams: [MediaStream]?
        ///  The name of the flow.
        public let name: String?
        /// Specifies the configuration settings for NDI outputs. Required when the flow includes NDI outputs.
        public let ndiConfig: NdiConfig?
        ///  The outputs in this flow.
        public let outputs: [Output]?
        ///  The source for the flow.
        public let source: Source?
        ///  The settings for the source failover.
        public let sourceFailoverConfig: FailoverConfig?
        ///  The settings for source monitoring.
        public let sourceMonitoringConfig: MonitoringConfig?
        /// The settings for the sources that are assigned to the flow.
        public let sources: [Source]?
        ///  The current status of the flow.
        public let status: Status?
        ///  The VPC Interfaces for this flow.
        public let vpcInterfaces: [VpcInterface]?

        @inlinable
        public init(availabilityZone: String? = nil, description: String? = nil, egressIp: String? = nil, entitlements: [Entitlement]? = nil, flowArn: String? = nil, flowSize: FlowSize? = nil, maintenance: Maintenance? = nil, mediaStreams: [MediaStream]? = nil, name: String? = nil, ndiConfig: NdiConfig? = nil, outputs: [Output]? = nil, source: Source? = nil, sourceFailoverConfig: FailoverConfig? = nil, sourceMonitoringConfig: MonitoringConfig? = nil, sources: [Source]? = nil, status: Status? = nil, vpcInterfaces: [VpcInterface]? = nil) {
            self.availabilityZone = availabilityZone
            self.description = description
            self.egressIp = egressIp
            self.entitlements = entitlements
            self.flowArn = flowArn
            self.flowSize = flowSize
            self.maintenance = maintenance
            self.mediaStreams = mediaStreams
            self.name = name
            self.ndiConfig = ndiConfig
            self.outputs = outputs
            self.source = source
            self.sourceFailoverConfig = sourceFailoverConfig
            self.sourceMonitoringConfig = sourceMonitoringConfig
            self.sources = sources
            self.status = status
            self.vpcInterfaces = vpcInterfaces
        }

        private enum CodingKeys: String, CodingKey {
            case availabilityZone = "availabilityZone"
            case description = "description"
            case egressIp = "egressIp"
            case entitlements = "entitlements"
            case flowArn = "flowArn"
            case flowSize = "flowSize"
            case maintenance = "maintenance"
            case mediaStreams = "mediaStreams"
            case name = "name"
            case ndiConfig = "ndiConfig"
            case outputs = "outputs"
            case source = "source"
            case sourceFailoverConfig = "sourceFailoverConfig"
            case sourceMonitoringConfig = "sourceMonitoringConfig"
            case sources = "sources"
            case status = "status"
            case vpcInterfaces = "vpcInterfaces"
        }
    }

    public struct Fmtp: AWSDecodableShape {
        ///  The format of the audio channel.
        public let channelOrder: String?
        /// The format used for the representation of color.
        public let colorimetry: Colorimetry?
        /// The frame rate for the video stream, in frames/second. For example: 60000/1001.
        public let exactFramerate: String?
        /// The pixel aspect ratio (PAR) of the video.
        public let par: String?
        /// The encoding range of the video.
        public let range: Range?
        /// The type of compression that was used to smooth the video’s appearance.
        public let scanMode: ScanMode?
        /// The transfer characteristic system (TCS) that is used in the video.
        public let tcs: Tcs?

        @inlinable
        public init(channelOrder: String? = nil, colorimetry: Colorimetry? = nil, exactFramerate: String? = nil, par: String? = nil, range: Range? = nil, scanMode: ScanMode? = nil, tcs: Tcs? = nil) {
            self.channelOrder = channelOrder
            self.colorimetry = colorimetry
            self.exactFramerate = exactFramerate
            self.par = par
            self.range = range
            self.scanMode = scanMode
            self.tcs = tcs
        }

        private enum CodingKeys: String, CodingKey {
            case channelOrder = "channelOrder"
            case colorimetry = "colorimetry"
            case exactFramerate = "exactFramerate"
            case par = "par"
            case range = "range"
            case scanMode = "scanMode"
            case tcs = "tcs"
        }
    }

    public struct FmtpRequest: AWSEncodableShape {
        ///  The format of the audio channel.
        public let channelOrder: String?
        ///  The format that is used for the representation of color.
        public let colorimetry: Colorimetry?
        ///  The frame rate for the video stream, in frames/second. For example: 60000/1001. If you specify a whole number, MediaConnect uses a ratio of N/1. For example, if you specify 60, MediaConnect uses 60/1 as the exactFramerate.
        public let exactFramerate: String?
        ///  The pixel aspect ratio (PAR) of the video.
        public let par: String?
        ///  The encoding range of the video.
        public let range: Range?
        ///  The type of compression that was used to smooth the video’s appearance.
        public let scanMode: ScanMode?
        ///  The transfer characteristic system (TCS) that is used in the video.
        public let tcs: Tcs?

        @inlinable
        public init(channelOrder: String? = nil, colorimetry: Colorimetry? = nil, exactFramerate: String? = nil, par: String? = nil, range: Range? = nil, scanMode: ScanMode? = nil, tcs: Tcs? = nil) {
            self.channelOrder = channelOrder
            self.colorimetry = colorimetry
            self.exactFramerate = exactFramerate
            self.par = par
            self.range = range
            self.scanMode = scanMode
            self.tcs = tcs
        }

        private enum CodingKeys: String, CodingKey {
            case channelOrder = "channelOrder"
            case colorimetry = "colorimetry"
            case exactFramerate = "exactFramerate"
            case par = "par"
            case range = "range"
            case scanMode = "scanMode"
            case tcs = "tcs"
        }
    }

    public struct FrameResolution: AWSDecodableShape {
        ///  The number of pixels in the height of the video frame.
        public let frameHeight: Int?
        ///  The number of pixels in the width of the video frame.
        public let frameWidth: Int?

        @inlinable
        public init(frameHeight: Int? = nil, frameWidth: Int? = nil) {
            self.frameHeight = frameHeight
            self.frameWidth = frameWidth
        }

        private enum CodingKeys: String, CodingKey {
            case frameHeight = "frameHeight"
            case frameWidth = "frameWidth"
        }
    }

    public struct FrozenFrames: AWSEncodableShape & AWSDecodableShape {
        /// Indicates whether the FrozenFrames metric is enabled or disabled.
        public let state: State?
        ///  Specifies the number of consecutive seconds of a static image that triggers an event or alert.
        public let thresholdSeconds: Int?

        @inlinable
        public init(state: State? = nil, thresholdSeconds: Int? = nil) {
            self.state = state
            self.thresholdSeconds = thresholdSeconds
        }

        private enum CodingKeys: String, CodingKey {
            case state = "state"
            case thresholdSeconds = "thresholdSeconds"
        }
    }

    public struct Gateway: AWSDecodableShape {
        ///  The range of IP addresses that contribute content or initiate output requests for flows communicating with this gateway. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
        public let egressCidrBlocks: [String]?
        ///  The Amazon Resource Name (ARN) of the gateway.
        public let gatewayArn: String?
        /// Messages with information about the gateway.
        public let gatewayMessages: [MessageDetail]?
        ///  The current status of the gateway.
        public let gatewayState: GatewayState?
        ///  The name of the gateway. This name can not be modified after the gateway is created.
        public let name: String?
        ///  The list of networks in the gateway.
        public let networks: [GatewayNetwork]?

        @inlinable
        public init(egressCidrBlocks: [String]? = nil, gatewayArn: String? = nil, gatewayMessages: [MessageDetail]? = nil, gatewayState: GatewayState? = nil, name: String? = nil, networks: [GatewayNetwork]? = nil) {
            self.egressCidrBlocks = egressCidrBlocks
            self.gatewayArn = gatewayArn
            self.gatewayMessages = gatewayMessages
            self.gatewayState = gatewayState
            self.name = name
            self.networks = networks
        }

        private enum CodingKeys: String, CodingKey {
            case egressCidrBlocks = "egressCidrBlocks"
            case gatewayArn = "gatewayArn"
            case gatewayMessages = "gatewayMessages"
            case gatewayState = "gatewayState"
            case name = "name"
            case networks = "networks"
        }
    }

    public struct GatewayBridgeSource: AWSDecodableShape {
        ///  The ARN of the bridge feeding this flow.
        public let bridgeArn: String?
        ///  The name of the VPC interface attachment to use for this bridge source.
        public let vpcInterfaceAttachment: VpcInterfaceAttachment?

        @inlinable
        public init(bridgeArn: String? = nil, vpcInterfaceAttachment: VpcInterfaceAttachment? = nil) {
            self.bridgeArn = bridgeArn
            self.vpcInterfaceAttachment = vpcInterfaceAttachment
        }

        private enum CodingKeys: String, CodingKey {
            case bridgeArn = "bridgeArn"
            case vpcInterfaceAttachment = "vpcInterfaceAttachment"
        }
    }

    public struct GatewayInstance: AWSDecodableShape {
        /// The availability of the instance to host new bridges. The bridgePlacement property can be LOCKED or AVAILABLE. If it is LOCKED, no new bridges can be deployed to this instance. If it is AVAILABLE, new bridges can be deployed to this instance.
        public let bridgePlacement: BridgePlacement?
        /// The connection state of the instance.
        public let connectionStatus: ConnectionStatus?
        /// The Amazon Resource Name (ARN) of the instance.
        public let gatewayArn: String?
        /// The ARN of the gateway.
        public let gatewayInstanceArn: String?
        /// The instance ID generated by the SSM install. This will begin with "mi-".
        public let instanceId: String?
        ///  Messages with information about the gateway.
        public let instanceMessages: [MessageDetail]?
        /// The status of the instance.
        public let instanceState: InstanceState?
        ///  The running bridge count.
        public let runningBridgeCount: Int?

        @inlinable
        public init(bridgePlacement: BridgePlacement? = nil, connectionStatus: ConnectionStatus? = nil, gatewayArn: String? = nil, gatewayInstanceArn: String? = nil, instanceId: String? = nil, instanceMessages: [MessageDetail]? = nil, instanceState: InstanceState? = nil, runningBridgeCount: Int? = nil) {
            self.bridgePlacement = bridgePlacement
            self.connectionStatus = connectionStatus
            self.gatewayArn = gatewayArn
            self.gatewayInstanceArn = gatewayInstanceArn
            self.instanceId = instanceId
            self.instanceMessages = instanceMessages
            self.instanceState = instanceState
            self.runningBridgeCount = runningBridgeCount
        }

        private enum CodingKeys: String, CodingKey {
            case bridgePlacement = "bridgePlacement"
            case connectionStatus = "connectionStatus"
            case gatewayArn = "gatewayArn"
            case gatewayInstanceArn = "gatewayInstanceArn"
            case instanceId = "instanceId"
            case instanceMessages = "instanceMessages"
            case instanceState = "instanceState"
            case runningBridgeCount = "runningBridgeCount"
        }
    }

    public struct GatewayNetwork: AWSEncodableShape & AWSDecodableShape {
        /// A unique IP address range to use for this network. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
        public let cidrBlock: String?
        /// The name of the network. This name is used to reference the network and must be unique among networks in this gateway.
        public let name: String?

        @inlinable
        public init(cidrBlock: String? = nil, name: String? = nil) {
            self.cidrBlock = cidrBlock
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case cidrBlock = "cidrBlock"
            case name = "name"
        }
    }

    public struct GrantEntitlementRequest: AWSEncodableShape {
        ///  Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
        public let dataTransferSubscriberFeePercent: Int?
        ///  A description of the entitlement. This description appears only on the MediaConnect console and will not be seen by the subscriber or end user.
        public let description: String?
        ///  The type of encryption that will be used on the output that is associated with this entitlement. Allowable encryption types: static-key, speke.
        public let encryption: Encryption?
        ///  An indication of whether the new entitlement should be enabled or disabled as soon as it is created. If you don’t specify the entitlementStatus field in your request, MediaConnect sets it to ENABLED.
        public let entitlementStatus: EntitlementStatus?
        ///  The key-value pairs that can be used to tag and organize the entitlement.
        public let entitlementTags: [String: String]?
        ///  The name of the entitlement. This value must be unique within the current flow.
        public let name: String?
        ///  The Amazon Web Services account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flows using your content as the source.
        public let subscribers: [String]?

        @inlinable
        public init(dataTransferSubscriberFeePercent: Int? = nil, description: String? = nil, encryption: Encryption? = nil, entitlementStatus: EntitlementStatus? = nil, entitlementTags: [String: String]? = nil, name: String? = nil, subscribers: [String]? = nil) {
            self.dataTransferSubscriberFeePercent = dataTransferSubscriberFeePercent
            self.description = description
            self.encryption = encryption
            self.entitlementStatus = entitlementStatus
            self.entitlementTags = entitlementTags
            self.name = name
            self.subscribers = subscribers
        }

        private enum CodingKeys: String, CodingKey {
            case dataTransferSubscriberFeePercent = "dataTransferSubscriberFeePercent"
            case description = "description"
            case encryption = "encryption"
            case entitlementStatus = "entitlementStatus"
            case entitlementTags = "entitlementTags"
            case name = "name"
            case subscribers = "subscribers"
        }
    }

    public struct GrantFlowEntitlementsRequest: AWSEncodableShape {
        ///  The list of entitlements that you want to grant.
        public let entitlements: [GrantEntitlementRequest]?
        ///  The Amazon Resource Name (ARN) of the flow that you want to grant entitlements on.
        public let flowArn: String

        @inlinable
        public init(entitlements: [GrantEntitlementRequest]? = nil, flowArn: String) {
            self.entitlements = entitlements
            self.flowArn = flowArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.entitlements, forKey: .entitlements)
            request.encodePath(self.flowArn, key: "FlowArn")
        }

        private enum CodingKeys: String, CodingKey {
            case entitlements = "entitlements"
        }
    }

    public struct GrantFlowEntitlementsResponse: AWSDecodableShape {
        ///  The entitlements that were just granted.
        public let entitlements: [Entitlement]?
        ///  The ARN of the flow that these entitlements were granted to.
        public let flowArn: String?

        @inlinable
        public init(entitlements: [Entitlement]? = nil, flowArn: String? = nil) {
            self.entitlements = entitlements
            self.flowArn = flowArn
        }

        private enum CodingKeys: String, CodingKey {
            case entitlements = "entitlements"
            case flowArn = "flowArn"
        }
    }

    public struct IngressGatewayBridge: AWSDecodableShape {
        /// The ID of the instance running this bridge.
        public let instanceId: String?
        /// The maximum expected bitrate (in bps) of the ingress bridge.
        public let maxBitrate: Int?
        /// The maximum number of outputs on the ingress bridge.
        public let maxOutputs: Int?

        @inlinable
        public init(instanceId: String? = nil, maxBitrate: Int? = nil, maxOutputs: Int? = nil) {
            self.instanceId = instanceId
            self.maxBitrate = maxBitrate
            self.maxOutputs = maxOutputs
        }

        private enum CodingKeys: String, CodingKey {
            case instanceId = "instanceId"
            case maxBitrate = "maxBitrate"
            case maxOutputs = "maxOutputs"
        }
    }

    public struct InputConfiguration: AWSDecodableShape {
        ///  The IP address that the flow listens on for incoming content for a media stream.
        public let inputIp: String?
        ///  The port that the flow listens on for an incoming media stream.
        public let inputPort: Int?
        ///  The VPC interface where the media stream comes in from.
        public let interface: Interface?

        @inlinable
        public init(inputIp: String? = nil, inputPort: Int? = nil, interface: Interface? = nil) {
            self.inputIp = inputIp
            self.inputPort = inputPort
            self.interface = interface
        }

        private enum CodingKeys: String, CodingKey {
            case inputIp = "inputIp"
            case inputPort = "inputPort"
            case interface = "interface"
        }
    }

    public struct InputConfigurationRequest: AWSEncodableShape {
        ///  The port that you want the flow to listen on for an incoming media stream.
        public let inputPort: Int?
        ///  The VPC interface that you want to use for the incoming media stream.
        public let interface: InterfaceRequest?

        @inlinable
        public init(inputPort: Int? = nil, interface: InterfaceRequest? = nil) {
            self.inputPort = inputPort
            self.interface = interface
        }

        private enum CodingKeys: String, CodingKey {
            case inputPort = "inputPort"
            case interface = "interface"
        }
    }

    public struct Interface: AWSDecodableShape {
        ///  The name of the VPC interface.
        public let name: String?

        @inlinable
        public init(name: String? = nil) {
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
        }
    }

    public struct InterfaceRequest: AWSEncodableShape {
        ///  The name of the VPC interface.
        public let name: String?

        @inlinable
        public init(name: String? = nil) {
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
        }
    }

    public struct ListBridgesRequest: AWSEncodableShape {
        ///  Filter the list results to display only the bridges associated with the selected ARN.
        public let filterArn: String?
        ///  The maximum number of results to return per API request.  For example, you submit a ListBridges request with MaxResults set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.)  The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 10 results per page.
        public let maxResults: Int?
        ///  The token that identifies the batch of results that you want to see.  For example, you submit a ListBridges request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListBridges request a second time and specify the NextToken value.
        public let nextToken: String?

        @inlinable
        public init(filterArn: String? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filterArn = filterArn
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.filterArn, key: "filterArn")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListBridgesResponse: AWSDecodableShape {
        ///  A list of bridge summaries.
        public let bridges: [ListedBridge]?
        ///  The token that identifies the batch of results that you want to see.  For example, you submit a ListBridges request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListBridges request a second time and specify the NextToken value.
        public let nextToken: String?

        @inlinable
        public init(bridges: [ListedBridge]? = nil, nextToken: String? = nil) {
            self.bridges = bridges
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case bridges = "bridges"
            case nextToken = "nextToken"
        }
    }

    public struct ListEntitlementsRequest: AWSEncodableShape {
        ///  The maximum number of results to return per API request.  For example, you submit a ListEntitlements request with set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.)  The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 20 results per page.
        public let maxResults: Int?
        ///  The token that identifies the batch of results that you want to see.  For example, you submit a ListEntitlements request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListEntitlements request a second time and specify the NextToken value.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListEntitlementsResponse: AWSDecodableShape {
        /// A list of entitlements that have been granted to you from other Amazon Web Services accounts.
        public let entitlements: [ListedEntitlement]?
        /// The token that identifies the batch of results that you want to see.  For example, you submit a ListEntitlements request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListEntitlements request a second time and specify the NextToken value.
        public let nextToken: String?

        @inlinable
        public init(entitlements: [ListedEntitlement]? = nil, nextToken: String? = nil) {
            self.entitlements = entitlements
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case entitlements = "entitlements"
            case nextToken = "nextToken"
        }
    }

    public struct ListFlowsRequest: AWSEncodableShape {
        ///  The maximum number of results to return per API request.  For example, you submit a ListFlows request with MaxResults set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.)  The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 10 results per page.
        public let maxResults: Int?
        ///  The token that identifies the batch of results that you want to see.  For example, you submit a ListFlows request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListFlows request a second time and specify the NextToken value.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListFlowsResponse: AWSDecodableShape {
        ///  A list of flow summaries.
        public let flows: [ListedFlow]?
        ///  The token that identifies the batch of results that you want to see.  For example, you submit a ListFlows request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListFlows request a second time and specify the NextToken value.
        public let nextToken: String?

        @inlinable
        public init(flows: [ListedFlow]? = nil, nextToken: String? = nil) {
            self.flows = flows
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case flows = "flows"
            case nextToken = "nextToken"
        }
    }

    public struct ListGatewayInstancesRequest: AWSEncodableShape {
        ///  Filter the list results to display only the instances associated with the selected Gateway ARN.
        public let filterArn: String?
        ///  The maximum number of results to return per API request.  For example, you submit a ListInstances request with MaxResults set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.)  The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 10 results per page.
        public let maxResults: Int?
        ///  The token that identifies the batch of results that you want to see.  For example, you submit a ListInstances request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListInstances request a second time and specify the NextToken value.
        public let nextToken: String?

        @inlinable
        public init(filterArn: String? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filterArn = filterArn
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.filterArn, key: "filterArn")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListGatewayInstancesResponse: AWSDecodableShape {
        ///  A list of instance summaries.
        public let instances: [ListedGatewayInstance]?
        ///  The token that identifies the batch of results that you want to see.  For example, you submit a ListInstances request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListInstances request a second time and specify the NextToken value.
        public let nextToken: String?

        @inlinable
        public init(instances: [ListedGatewayInstance]? = nil, nextToken: String? = nil) {
            self.instances = instances
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case instances = "instances"
            case nextToken = "nextToken"
        }
    }

    public struct ListGatewaysRequest: AWSEncodableShape {
        ///  The maximum number of results to return per API request.  For example, you submit a ListGateways request with MaxResults set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.)  The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 10 results per page.
        public let maxResults: Int?
        ///  The token that identifies the batch of results that you want to see.  For example, you submit a ListGateways request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListGateways request a second time and specify the NextToken value.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListGatewaysResponse: AWSDecodableShape {
        ///  A list of gateway summaries.
        public let gateways: [ListedGateway]?
        ///  The token that identifies the batch of results that you want to see.  For example, you submit a ListGateways request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListGateways request a second time and specify the NextToken value.
        public let nextToken: String?

        @inlinable
        public init(gateways: [ListedGateway]? = nil, nextToken: String? = nil) {
            self.gateways = gateways
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case gateways = "gateways"
            case nextToken = "nextToken"
        }
    }

    public struct ListOfferingsRequest: AWSEncodableShape {
        ///  The maximum number of results to return per API request.  For example, you submit a ListOfferings request with MaxResults set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.)  The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 10 results per page.
        public let maxResults: Int?
        ///  The token that identifies the batch of results that you want to see.  For example, you submit a ListOfferings request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListOfferings request a second time and specify the NextToken value.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListOfferingsResponse: AWSDecodableShape {
        ///  The token that identifies the batch of results that you want to see.  For example, you submit a ListOfferings request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListOfferings request a second time and specify the NextToken value.
        public let nextToken: String?
        ///  A list of offerings that are available to this account in the current Amazon Web Services Region.
        public let offerings: [Offering]?

        @inlinable
        public init(nextToken: String? = nil, offerings: [Offering]? = nil) {
            self.nextToken = nextToken
            self.offerings = offerings
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case offerings = "offerings"
        }
    }

    public struct ListReservationsRequest: AWSEncodableShape {
        ///  The maximum number of results to return per API request.  For example, you submit a ListReservations request with MaxResults set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.)  The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 10 results per page.
        public let maxResults: Int?
        ///  The token that identifies the batch of results that you want to see.  For example, you submit a ListReservations request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListOfferings request a second time and specify the NextToken value.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListReservationsResponse: AWSDecodableShape {
        ///  The token that identifies the batch of results that you want to see.  For example, you submit a ListReservations request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListReservations request a second time and specify the NextToken value.
        public let nextToken: String?
        ///  A list of all reservations that have been purchased by this account in the current Amazon Web Services Region.
        public let reservations: [Reservation]?

        @inlinable
        public init(nextToken: String? = nil, reservations: [Reservation]? = nil) {
            self.nextToken = nextToken
            self.reservations = reservations
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case reservations = "reservations"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) that identifies the MediaConnect resource for which to list the tags.
        public let resourceArn: String

        @inlinable
        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "ResourceArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        ///  A map from tag keys to values. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
        public let tags: [String: String]?

        @inlinable
        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
        }
    }

    public struct ListedBridge: AWSDecodableShape {
        ///  The ARN of the bridge.
        public let bridgeArn: String?
        /// The state of the bridge.
        public let bridgeState: BridgeState?
        ///  The type of the bridge.
        public let bridgeType: String?
        ///  The name of the bridge.
        public let name: String?
        ///  The ARN of the gateway associated with the bridge.
        public let placementArn: String?

        @inlinable
        public init(bridgeArn: String? = nil, bridgeState: BridgeState? = nil, bridgeType: String? = nil, name: String? = nil, placementArn: String? = nil) {
            self.bridgeArn = bridgeArn
            self.bridgeState = bridgeState
            self.bridgeType = bridgeType
            self.name = name
            self.placementArn = placementArn
        }

        private enum CodingKeys: String, CodingKey {
            case bridgeArn = "bridgeArn"
            case bridgeState = "bridgeState"
            case bridgeType = "bridgeType"
            case name = "name"
            case placementArn = "placementArn"
        }
    }

    public struct ListedEntitlement: AWSDecodableShape {
        ///  Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
        public let dataTransferSubscriberFeePercent: Int?
        ///  The ARN of the entitlement.
        public let entitlementArn: String?
        ///  The name of the entitlement.
        public let entitlementName: String?

        @inlinable
        public init(dataTransferSubscriberFeePercent: Int? = nil, entitlementArn: String? = nil, entitlementName: String? = nil) {
            self.dataTransferSubscriberFeePercent = dataTransferSubscriberFeePercent
            self.entitlementArn = entitlementArn
            self.entitlementName = entitlementName
        }

        private enum CodingKeys: String, CodingKey {
            case dataTransferSubscriberFeePercent = "dataTransferSubscriberFeePercent"
            case entitlementArn = "entitlementArn"
            case entitlementName = "entitlementName"
        }
    }

    public struct ListedFlow: AWSDecodableShape {
        ///  The Availability Zone that the flow was created in.
        public let availabilityZone: String?
        ///  A description of the flow.
        public let description: String?
        ///  The ARN of the flow.
        public let flowArn: String?
        ///  The maintenance settings for the flow.
        public let maintenance: Maintenance?
        ///  The name of the flow.
        public let name: String?
        ///  The type of source. This value is either owned (originated somewhere other than an MediaConnect flow owned by another Amazon Web Services account) or entitled (originated at a MediaConnect flow owned by another Amazon Web Services account).
        public let sourceType: SourceType?
        ///  The current status of the flow.
        public let status: Status?

        @inlinable
        public init(availabilityZone: String? = nil, description: String? = nil, flowArn: String? = nil, maintenance: Maintenance? = nil, name: String? = nil, sourceType: SourceType? = nil, status: Status? = nil) {
            self.availabilityZone = availabilityZone
            self.description = description
            self.flowArn = flowArn
            self.maintenance = maintenance
            self.name = name
            self.sourceType = sourceType
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case availabilityZone = "availabilityZone"
            case description = "description"
            case flowArn = "flowArn"
            case maintenance = "maintenance"
            case name = "name"
            case sourceType = "sourceType"
            case status = "status"
        }
    }

    public struct ListedGateway: AWSDecodableShape {
        ///  The Amazon Resource Name (ARN) of the gateway.
        public let gatewayArn: String?
        ///  The status of the gateway.
        public let gatewayState: GatewayState?
        ///  The name of the gateway.
        public let name: String?

        @inlinable
        public init(gatewayArn: String? = nil, gatewayState: GatewayState? = nil, name: String? = nil) {
            self.gatewayArn = gatewayArn
            self.gatewayState = gatewayState
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case gatewayArn = "gatewayArn"
            case gatewayState = "gatewayState"
            case name = "name"
        }
    }

    public struct ListedGatewayInstance: AWSDecodableShape {
        ///  The Amazon Resource Name (ARN) of the gateway.
        public let gatewayArn: String?
        ///  The Amazon Resource Name (ARN) of the instance.
        public let gatewayInstanceArn: String?
        ///  The managed instance ID generated by the SSM install. This will begin with "mi-".
        public let instanceId: String?
        ///  The status of the instance.
        public let instanceState: InstanceState?

        @inlinable
        public init(gatewayArn: String? = nil, gatewayInstanceArn: String? = nil, instanceId: String? = nil, instanceState: InstanceState? = nil) {
            self.gatewayArn = gatewayArn
            self.gatewayInstanceArn = gatewayInstanceArn
            self.instanceId = instanceId
            self.instanceState = instanceState
        }

        private enum CodingKeys: String, CodingKey {
            case gatewayArn = "gatewayArn"
            case gatewayInstanceArn = "gatewayInstanceArn"
            case instanceId = "instanceId"
            case instanceState = "instanceState"
        }
    }

    public struct Maintenance: AWSDecodableShape {
        ///  A day of a week when the maintenance will happen. Use Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday.
        public let maintenanceDay: MaintenanceDay?
        ///  The Maintenance has to be performed before this deadline in ISO UTC format. Example: 2021-01-30T08:30:00Z.
        public let maintenanceDeadline: String?
        ///  A scheduled date in ISO UTC format when the maintenance will happen. Use YYYY-MM-DD format. Example: 2021-01-30.
        public let maintenanceScheduledDate: String?
        ///  UTC time when the maintenance will happen. Use 24-hour HH:MM format. Minutes must be 00. Example: 13:00. The default value is 02:00.
        public let maintenanceStartHour: String?

        @inlinable
        public init(maintenanceDay: MaintenanceDay? = nil, maintenanceDeadline: String? = nil, maintenanceScheduledDate: String? = nil, maintenanceStartHour: String? = nil) {
            self.maintenanceDay = maintenanceDay
            self.maintenanceDeadline = maintenanceDeadline
            self.maintenanceScheduledDate = maintenanceScheduledDate
            self.maintenanceStartHour = maintenanceStartHour
        }

        private enum CodingKeys: String, CodingKey {
            case maintenanceDay = "maintenanceDay"
            case maintenanceDeadline = "maintenanceDeadline"
            case maintenanceScheduledDate = "maintenanceScheduledDate"
            case maintenanceStartHour = "maintenanceStartHour"
        }
    }

    public struct MediaStream: AWSDecodableShape {
        ///  Attributes that are related to the media stream.
        public let attributes: MediaStreamAttributes?
        ///  The sample rate for the stream. This value is measured in Hz.
        public let clockRate: Int?
        ///  A description that can help you quickly identify what your media stream is used for.
        public let description: String?
        ///  The format type number (sometimes referred to as RTP payload type) of the media stream. MediaConnect assigns this value to the media stream. For ST 2110 JPEG XS outputs, you need to provide this value to the receiver.
        public let fmt: Int?
        ///  A unique identifier for the media stream.
        public let mediaStreamId: Int?
        ///  A name that helps you distinguish one media stream from another.
        public let mediaStreamName: String?
        ///  The type of media stream.
        public let mediaStreamType: MediaStreamType?
        ///  The resolution of the video.
        public let videoFormat: String?

        @inlinable
        public init(attributes: MediaStreamAttributes? = nil, clockRate: Int? = nil, description: String? = nil, fmt: Int? = nil, mediaStreamId: Int? = nil, mediaStreamName: String? = nil, mediaStreamType: MediaStreamType? = nil, videoFormat: String? = nil) {
            self.attributes = attributes
            self.clockRate = clockRate
            self.description = description
            self.fmt = fmt
            self.mediaStreamId = mediaStreamId
            self.mediaStreamName = mediaStreamName
            self.mediaStreamType = mediaStreamType
            self.videoFormat = videoFormat
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "attributes"
            case clockRate = "clockRate"
            case description = "description"
            case fmt = "fmt"
            case mediaStreamId = "mediaStreamId"
            case mediaStreamName = "mediaStreamName"
            case mediaStreamType = "mediaStreamType"
            case videoFormat = "videoFormat"
        }
    }

    public struct MediaStreamAttributes: AWSDecodableShape {
        /// The settings that you want to use to define the media stream.
        public let fmtp: Fmtp?
        /// The audio language, in a format that is recognized by the receiver.
        public let lang: String?

        @inlinable
        public init(fmtp: Fmtp? = nil, lang: String? = nil) {
            self.fmtp = fmtp
            self.lang = lang
        }

        private enum CodingKeys: String, CodingKey {
            case fmtp = "fmtp"
            case lang = "lang"
        }
    }

    public struct MediaStreamAttributesRequest: AWSEncodableShape {
        /// The settings that you want to use to define the media stream.
        public let fmtp: FmtpRequest?
        /// The audio language, in a format that is recognized by the receiver.
        public let lang: String?

        @inlinable
        public init(fmtp: FmtpRequest? = nil, lang: String? = nil) {
            self.fmtp = fmtp
            self.lang = lang
        }

        private enum CodingKeys: String, CodingKey {
            case fmtp = "fmtp"
            case lang = "lang"
        }
    }

    public struct MediaStreamOutputConfiguration: AWSDecodableShape {
        ///  The transport parameters that are associated with each outbound media stream.
        public let destinationConfigurations: [DestinationConfiguration]?
        ///  The format that was used to encode the data. For ancillary data streams, set the encoding name to smpte291. For audio streams, set the encoding name to pcm. For video, 2110 streams, set the encoding name to raw. For video, JPEG XS streams, set the encoding name to jxsv.
        public let encodingName: EncodingName?
        /// A collection of parameters that determine how MediaConnect will convert the content. These fields only apply to outputs on flows that have a CDI source.
        public let encodingParameters: EncodingParameters?
        ///  The name of the media stream.
        public let mediaStreamName: String?

        @inlinable
        public init(destinationConfigurations: [DestinationConfiguration]? = nil, encodingName: EncodingName? = nil, encodingParameters: EncodingParameters? = nil, mediaStreamName: String? = nil) {
            self.destinationConfigurations = destinationConfigurations
            self.encodingName = encodingName
            self.encodingParameters = encodingParameters
            self.mediaStreamName = mediaStreamName
        }

        private enum CodingKeys: String, CodingKey {
            case destinationConfigurations = "destinationConfigurations"
            case encodingName = "encodingName"
            case encodingParameters = "encodingParameters"
            case mediaStreamName = "mediaStreamName"
        }
    }

    public struct MediaStreamOutputConfigurationRequest: AWSEncodableShape {
        ///  The media streams that you want to associate with the output.
        public let destinationConfigurations: [DestinationConfigurationRequest]?
        ///  The format that will be used to encode the data. For ancillary data streams, set the encoding name to smpte291. For audio streams, set the encoding name to pcm. For video, 2110 streams, set the encoding name to raw. For video, JPEG XS streams, set the encoding name to jxsv.
        public let encodingName: EncodingName?
        ///  A collection of parameters that determine how MediaConnect will convert the content. These fields only apply to outputs on flows that have a CDI source.
        public let encodingParameters: EncodingParametersRequest?
        ///  The name of the media stream that is associated with the output.
        public let mediaStreamName: String?

        @inlinable
        public init(destinationConfigurations: [DestinationConfigurationRequest]? = nil, encodingName: EncodingName? = nil, encodingParameters: EncodingParametersRequest? = nil, mediaStreamName: String? = nil) {
            self.destinationConfigurations = destinationConfigurations
            self.encodingName = encodingName
            self.encodingParameters = encodingParameters
            self.mediaStreamName = mediaStreamName
        }

        private enum CodingKeys: String, CodingKey {
            case destinationConfigurations = "destinationConfigurations"
            case encodingName = "encodingName"
            case encodingParameters = "encodingParameters"
            case mediaStreamName = "mediaStreamName"
        }
    }

    public struct MediaStreamSourceConfiguration: AWSDecodableShape {
        ///  The format that was used to encode the data. For ancillary data streams, set the encoding name to smpte291. For audio streams, set the encoding name to pcm. For video, 2110 streams, set the encoding name to raw. For video, JPEG XS streams, set the encoding name to jxsv.
        public let encodingName: EncodingName?
        /// The media streams that you want to associate with the source.
        public let inputConfigurations: [InputConfiguration]?
        /// A name that helps you distinguish one media stream from another.
        public let mediaStreamName: String?

        @inlinable
        public init(encodingName: EncodingName? = nil, inputConfigurations: [InputConfiguration]? = nil, mediaStreamName: String? = nil) {
            self.encodingName = encodingName
            self.inputConfigurations = inputConfigurations
            self.mediaStreamName = mediaStreamName
        }

        private enum CodingKeys: String, CodingKey {
            case encodingName = "encodingName"
            case inputConfigurations = "inputConfigurations"
            case mediaStreamName = "mediaStreamName"
        }
    }

    public struct MediaStreamSourceConfigurationRequest: AWSEncodableShape {
        /// The format that was used to encode the data. For ancillary data streams, set the encoding name to smpte291. For audio streams, set the encoding name to pcm. For video, 2110 streams, set the encoding name to raw. For video, JPEG XS streams, set the encoding name to jxsv.
        public let encodingName: EncodingName?
        /// The media streams that you want to associate with the source.
        public let inputConfigurations: [InputConfigurationRequest]?
        /// The name of the media stream.
        public let mediaStreamName: String?

        @inlinable
        public init(encodingName: EncodingName? = nil, inputConfigurations: [InputConfigurationRequest]? = nil, mediaStreamName: String? = nil) {
            self.encodingName = encodingName
            self.inputConfigurations = inputConfigurations
            self.mediaStreamName = mediaStreamName
        }

        private enum CodingKeys: String, CodingKey {
            case encodingName = "encodingName"
            case inputConfigurations = "inputConfigurations"
            case mediaStreamName = "mediaStreamName"
        }
    }

    public struct MessageDetail: AWSDecodableShape {
        ///  The error code.
        public let code: String?
        ///  The specific error message that MediaConnect returns to help you understand the reason that the request did not succeed.
        public let message: String?
        ///  The name of the resource.
        public let resourceName: String?

        @inlinable
        public init(code: String? = nil, message: String? = nil, resourceName: String? = nil) {
            self.code = code
            self.message = message
            self.resourceName = resourceName
        }

        private enum CodingKeys: String, CodingKey {
            case code = "code"
            case message = "message"
            case resourceName = "resourceName"
        }
    }

    public struct Messages: AWSDecodableShape {
        ///  A list of errors that might have been generated from processes on this flow.
        public let errors: [String]?

        @inlinable
        public init(errors: [String]? = nil) {
            self.errors = errors
        }

        private enum CodingKeys: String, CodingKey {
            case errors = "errors"
        }
    }

    public struct MonitoringConfig: AWSEncodableShape & AWSDecodableShape {
        ///  Contains the settings for audio stream metrics monitoring.
        public let audioMonitoringSettings: [AudioMonitoringSetting]?
        ///  Indicates whether content quality analysis is enabled or disabled.
        public let contentQualityAnalysisState: ContentQualityAnalysisState?
        ///  Indicates whether thumbnails are enabled or disabled.
        public let thumbnailState: ThumbnailState?
        ///  Contains the settings for video stream metrics monitoring.
        public let videoMonitoringSettings: [VideoMonitoringSetting]?

        @inlinable
        public init(audioMonitoringSettings: [AudioMonitoringSetting]? = nil, contentQualityAnalysisState: ContentQualityAnalysisState? = nil, thumbnailState: ThumbnailState? = nil, videoMonitoringSettings: [VideoMonitoringSetting]? = nil) {
            self.audioMonitoringSettings = audioMonitoringSettings
            self.contentQualityAnalysisState = contentQualityAnalysisState
            self.thumbnailState = thumbnailState
            self.videoMonitoringSettings = videoMonitoringSettings
        }

        private enum CodingKeys: String, CodingKey {
            case audioMonitoringSettings = "audioMonitoringSettings"
            case contentQualityAnalysisState = "contentQualityAnalysisState"
            case thumbnailState = "thumbnailState"
            case videoMonitoringSettings = "videoMonitoringSettings"
        }
    }

    public struct MulticastSourceSettings: AWSEncodableShape & AWSDecodableShape {
        ///  The IP address of the source for source-specific multicast (SSM).
        public let multicastSourceIp: String?

        @inlinable
        public init(multicastSourceIp: String? = nil) {
            self.multicastSourceIp = multicastSourceIp
        }

        private enum CodingKeys: String, CodingKey {
            case multicastSourceIp = "multicastSourceIp"
        }
    }

    public struct NdiConfig: AWSEncodableShape & AWSDecodableShape {
        /// A prefix for the names of the NDI sources that the flow creates. If a custom name isn't specified, MediaConnect generates a unique 12-character ID as the prefix.
        public let machineName: String?
        /// A list of up to three NDI discovery server configurations. While not required by the API, this configuration is necessary for NDI functionality to work properly.
        public let ndiDiscoveryServers: [NdiDiscoveryServerConfig]?
        /// A setting that controls whether NDI outputs can be used in the flow. Must be ENABLED to add NDI outputs. Default is DISABLED.
        public let ndiState: NdiState?

        @inlinable
        public init(machineName: String? = nil, ndiDiscoveryServers: [NdiDiscoveryServerConfig]? = nil, ndiState: NdiState? = nil) {
            self.machineName = machineName
            self.ndiDiscoveryServers = ndiDiscoveryServers
            self.ndiState = ndiState
        }

        private enum CodingKeys: String, CodingKey {
            case machineName = "machineName"
            case ndiDiscoveryServers = "ndiDiscoveryServers"
            case ndiState = "ndiState"
        }
    }

    public struct NdiDiscoveryServerConfig: AWSEncodableShape & AWSDecodableShape {
        /// The unique network address of the NDI discovery server.
        public let discoveryServerAddress: String?
        /// The port for the NDI discovery server. Defaults to 5959 if a custom port isn't specified.
        public let discoveryServerPort: Int?
        /// The identifier for the Virtual Private Cloud (VPC) network interface used by the flow.
        public let vpcInterfaceAdapter: String?

        @inlinable
        public init(discoveryServerAddress: String? = nil, discoveryServerPort: Int? = nil, vpcInterfaceAdapter: String? = nil) {
            self.discoveryServerAddress = discoveryServerAddress
            self.discoveryServerPort = discoveryServerPort
            self.vpcInterfaceAdapter = vpcInterfaceAdapter
        }

        private enum CodingKeys: String, CodingKey {
            case discoveryServerAddress = "discoveryServerAddress"
            case discoveryServerPort = "discoveryServerPort"
            case vpcInterfaceAdapter = "vpcInterfaceAdapter"
        }
    }

    public struct Offering: AWSDecodableShape {
        ///  The type of currency that is used for billing. The currencyCode used for all reservations is US dollars.
        public let currencyCode: String?
        ///  The length of time that your reservation would be active.
        public let duration: Int?
        ///  The unit of measurement for the duration of the offering.
        public let durationUnits: DurationUnits?
        ///  The Amazon Resource Name (ARN) that MediaConnect assigns to the offering.
        public let offeringArn: String?
        ///  A description of the offering.
        public let offeringDescription: String?
        ///  The cost of a single unit. This value, in combination with priceUnits, makes up the rate.
        public let pricePerUnit: String?
        ///  The unit of measurement that is used for billing. This value, in combination with pricePerUnit, makes up the rate.
        public let priceUnits: PriceUnits?
        ///  A definition of the amount of outbound bandwidth that you would be reserving if you purchase the offering.
        public let resourceSpecification: ResourceSpecification?

        @inlinable
        public init(currencyCode: String? = nil, duration: Int? = nil, durationUnits: DurationUnits? = nil, offeringArn: String? = nil, offeringDescription: String? = nil, pricePerUnit: String? = nil, priceUnits: PriceUnits? = nil, resourceSpecification: ResourceSpecification? = nil) {
            self.currencyCode = currencyCode
            self.duration = duration
            self.durationUnits = durationUnits
            self.offeringArn = offeringArn
            self.offeringDescription = offeringDescription
            self.pricePerUnit = pricePerUnit
            self.priceUnits = priceUnits
            self.resourceSpecification = resourceSpecification
        }

        private enum CodingKeys: String, CodingKey {
            case currencyCode = "currencyCode"
            case duration = "duration"
            case durationUnits = "durationUnits"
            case offeringArn = "offeringArn"
            case offeringDescription = "offeringDescription"
            case pricePerUnit = "pricePerUnit"
            case priceUnits = "priceUnits"
            case resourceSpecification = "resourceSpecification"
        }
    }

    public struct Output: AWSDecodableShape {
        ///  The ARN of the bridge added to this output.
        public let bridgeArn: String?
        ///  The bridge output ports currently in use.
        public let bridgePorts: [Int]?
        ///  Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
        public let dataTransferSubscriberFeePercent: Int?
        ///  A description of the output.
        public let description: String?
        ///  The address where you want to send the output.
        public let destination: String?
        ///  The type of key used for the encryption. If no keyType is provided, the service will use the default setting (static-key).
        public let encryption: Encryption?
        ///  The ARN of the entitlement on the originator''s flow. This value is relevant only on entitled flows.
        public let entitlementArn: String?
        ///  The IP address that the receiver requires in order to establish a connection with the flow. For public networking, the ListenerAddress is represented by the elastic IP address of the flow. For private networking, the ListenerAddress is represented by the elastic network interface IP address of the VPC. This field applies only to outputs that use the Zixi pull or SRT listener protocol.
        public let listenerAddress: String?
        ///  The input ARN of the MediaLive channel. This parameter is relevant only for outputs that were added by creating a MediaLive input.
        public let mediaLiveInputArn: String?
        ///  The configuration for each media stream that is associated with the output.
        public let mediaStreamOutputConfigurations: [MediaStreamOutputConfiguration]?
        ///  The name of the output. This value must be unique within the current flow.
        public let name: String?
        ///  The ARN of the output.
        public let outputArn: String?
        ///  An indication of whether the output is transmitting data or not.
        public let outputStatus: OutputStatus?
        /// The IP address of the device that is currently receiving content from this output.    For outputs that use protocols where you specify the destination (such as SRT Caller or Zixi Push), this value matches the configured destination address.   For outputs that use listener protocols (such as SRT Listener), this value shows the address of the connected receiver.    Peer IP addresses aren't available for entitlements, managed MediaLive outputs, NDI outputs, and CDI/ST2110 outputs.    The peer IP address might not be visible for flows that haven't been started yet, or flows that were started before May 2025. In these cases, restart your flow to see the peer IP address.
        public let peerIpAddress: String?
        ///  The port to use when content is distributed to this output.
        public let port: Int?
        ///  Attributes related to the transport stream that are used in the output.
        public let transport: Transport?
        ///  The name of the VPC interface attachment to use for this output.
        public let vpcInterfaceAttachment: VpcInterfaceAttachment?

        @inlinable
        public init(bridgeArn: String? = nil, bridgePorts: [Int]? = nil, dataTransferSubscriberFeePercent: Int? = nil, description: String? = nil, destination: String? = nil, encryption: Encryption? = nil, entitlementArn: String? = nil, listenerAddress: String? = nil, mediaLiveInputArn: String? = nil, mediaStreamOutputConfigurations: [MediaStreamOutputConfiguration]? = nil, name: String? = nil, outputArn: String? = nil, outputStatus: OutputStatus? = nil, peerIpAddress: String? = nil, port: Int? = nil, transport: Transport? = nil, vpcInterfaceAttachment: VpcInterfaceAttachment? = nil) {
            self.bridgeArn = bridgeArn
            self.bridgePorts = bridgePorts
            self.dataTransferSubscriberFeePercent = dataTransferSubscriberFeePercent
            self.description = description
            self.destination = destination
            self.encryption = encryption
            self.entitlementArn = entitlementArn
            self.listenerAddress = listenerAddress
            self.mediaLiveInputArn = mediaLiveInputArn
            self.mediaStreamOutputConfigurations = mediaStreamOutputConfigurations
            self.name = name
            self.outputArn = outputArn
            self.outputStatus = outputStatus
            self.peerIpAddress = peerIpAddress
            self.port = port
            self.transport = transport
            self.vpcInterfaceAttachment = vpcInterfaceAttachment
        }

        private enum CodingKeys: String, CodingKey {
            case bridgeArn = "bridgeArn"
            case bridgePorts = "bridgePorts"
            case dataTransferSubscriberFeePercent = "dataTransferSubscriberFeePercent"
            case description = "description"
            case destination = "destination"
            case encryption = "encryption"
            case entitlementArn = "entitlementArn"
            case listenerAddress = "listenerAddress"
            case mediaLiveInputArn = "mediaLiveInputArn"
            case mediaStreamOutputConfigurations = "mediaStreamOutputConfigurations"
            case name = "name"
            case outputArn = "outputArn"
            case outputStatus = "outputStatus"
            case peerIpAddress = "peerIpAddress"
            case port = "port"
            case transport = "transport"
            case vpcInterfaceAttachment = "vpcInterfaceAttachment"
        }
    }

    public struct PurchaseOfferingRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the offering.
        public let offeringArn: String
        ///  The name that you want to use for the reservation.
        public let reservationName: String?
        ///  The date and time that you want the reservation to begin, in Coordinated Universal Time (UTC).  You can specify any date and time between 12:00am on the first day of the current month to the current time on today's date, inclusive. Specify the start in a 24-hour notation. Use the following format: YYYY-MM-DDTHH:mm:SSZ, where T and Z are literal characters. For example, to specify 11:30pm on March 5, 2020, enter 2020-03-05T23:30:00Z.
        public let start: String?

        @inlinable
        public init(offeringArn: String, reservationName: String? = nil, start: String? = nil) {
            self.offeringArn = offeringArn
            self.reservationName = reservationName
            self.start = start
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.offeringArn, key: "OfferingArn")
            try container.encodeIfPresent(self.reservationName, forKey: .reservationName)
            try container.encodeIfPresent(self.start, forKey: .start)
        }

        private enum CodingKeys: String, CodingKey {
            case reservationName = "reservationName"
            case start = "start"
        }
    }

    public struct PurchaseOfferingResponse: AWSDecodableShape {
        /// The details of the reservation that you just created when you purchased the offering.
        public let reservation: Reservation?

        @inlinable
        public init(reservation: Reservation? = nil) {
            self.reservation = reservation
        }

        private enum CodingKeys: String, CodingKey {
            case reservation = "reservation"
        }
    }

    public struct RemoveBridgeOutputRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the bridge that you want to update.
        public let bridgeArn: String
        ///  The name of the bridge output that you want to remove.
        public let outputName: String

        @inlinable
        public init(bridgeArn: String, outputName: String) {
            self.bridgeArn = bridgeArn
            self.outputName = outputName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.bridgeArn, key: "BridgeArn")
            request.encodePath(self.outputName, key: "OutputName")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct RemoveBridgeOutputResponse: AWSDecodableShape {
        ///  The ARN of the bridge from which the output was removed.
        public let bridgeArn: String?
        ///  The name of the bridge output that was removed.
        public let outputName: String?

        @inlinable
        public init(bridgeArn: String? = nil, outputName: String? = nil) {
            self.bridgeArn = bridgeArn
            self.outputName = outputName
        }

        private enum CodingKeys: String, CodingKey {
            case bridgeArn = "bridgeArn"
            case outputName = "outputName"
        }
    }

    public struct RemoveBridgeSourceRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the bridge that you want to update.
        public let bridgeArn: String
        ///  The name of the bridge source that you want to remove.
        public let sourceName: String

        @inlinable
        public init(bridgeArn: String, sourceName: String) {
            self.bridgeArn = bridgeArn
            self.sourceName = sourceName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.bridgeArn, key: "BridgeArn")
            request.encodePath(self.sourceName, key: "SourceName")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct RemoveBridgeSourceResponse: AWSDecodableShape {
        ///  The ARN of the bridge from which the source was removed.
        public let bridgeArn: String?
        ///  The name of the bridge source that was removed.
        public let sourceName: String?

        @inlinable
        public init(bridgeArn: String? = nil, sourceName: String? = nil) {
            self.bridgeArn = bridgeArn
            self.sourceName = sourceName
        }

        private enum CodingKeys: String, CodingKey {
            case bridgeArn = "bridgeArn"
            case sourceName = "sourceName"
        }
    }

    public struct RemoveFlowMediaStreamRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the flow that you want to update.
        public let flowArn: String
        ///  The name of the media stream that you want to remove.
        public let mediaStreamName: String

        @inlinable
        public init(flowArn: String, mediaStreamName: String) {
            self.flowArn = flowArn
            self.mediaStreamName = mediaStreamName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.flowArn, key: "FlowArn")
            request.encodePath(self.mediaStreamName, key: "MediaStreamName")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct RemoveFlowMediaStreamResponse: AWSDecodableShape {
        ///  The ARN of the flow that was updated.
        public let flowArn: String?
        ///  The name of the media stream that was removed.
        public let mediaStreamName: String?

        @inlinable
        public init(flowArn: String? = nil, mediaStreamName: String? = nil) {
            self.flowArn = flowArn
            self.mediaStreamName = mediaStreamName
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case mediaStreamName = "mediaStreamName"
        }
    }

    public struct RemoveFlowOutputRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the flow that you want to remove an output from.
        public let flowArn: String
        ///  The ARN of the output that you want to remove.
        public let outputArn: String

        @inlinable
        public init(flowArn: String, outputArn: String) {
            self.flowArn = flowArn
            self.outputArn = outputArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.flowArn, key: "FlowArn")
            request.encodePath(self.outputArn, key: "OutputArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct RemoveFlowOutputResponse: AWSDecodableShape {
        ///  The ARN of the flow that the output was removed from.
        public let flowArn: String?
        ///  The ARN of the output that was removed.
        public let outputArn: String?

        @inlinable
        public init(flowArn: String? = nil, outputArn: String? = nil) {
            self.flowArn = flowArn
            self.outputArn = outputArn
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case outputArn = "outputArn"
        }
    }

    public struct RemoveFlowSourceRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the flow that you want to remove a source from.
        public let flowArn: String
        ///  The ARN of the source that you want to remove.
        public let sourceArn: String

        @inlinable
        public init(flowArn: String, sourceArn: String) {
            self.flowArn = flowArn
            self.sourceArn = sourceArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.flowArn, key: "FlowArn")
            request.encodePath(self.sourceArn, key: "SourceArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct RemoveFlowSourceResponse: AWSDecodableShape {
        ///  The ARN of the flow that the source was removed from.
        public let flowArn: String?
        ///  The ARN of the source that was removed.
        public let sourceArn: String?

        @inlinable
        public init(flowArn: String? = nil, sourceArn: String? = nil) {
            self.flowArn = flowArn
            self.sourceArn = sourceArn
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case sourceArn = "sourceArn"
        }
    }

    public struct RemoveFlowVpcInterfaceRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the flow that you want to remove a VPC interface from.
        public let flowArn: String
        ///  The name of the VPC interface that you want to remove.
        public let vpcInterfaceName: String

        @inlinable
        public init(flowArn: String, vpcInterfaceName: String) {
            self.flowArn = flowArn
            self.vpcInterfaceName = vpcInterfaceName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.flowArn, key: "FlowArn")
            request.encodePath(self.vpcInterfaceName, key: "VpcInterfaceName")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct RemoveFlowVpcInterfaceResponse: AWSDecodableShape {
        ///  The ARN of the flow that is associated with the VPC interface you removed.
        public let flowArn: String?
        ///  IDs of network interfaces associated with the removed VPC interface that MediaConnect was unable to remove.
        public let nonDeletedNetworkInterfaceIds: [String]?
        ///  The name of the VPC interface that was removed.
        public let vpcInterfaceName: String?

        @inlinable
        public init(flowArn: String? = nil, nonDeletedNetworkInterfaceIds: [String]? = nil, vpcInterfaceName: String? = nil) {
            self.flowArn = flowArn
            self.nonDeletedNetworkInterfaceIds = nonDeletedNetworkInterfaceIds
            self.vpcInterfaceName = vpcInterfaceName
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case nonDeletedNetworkInterfaceIds = "nonDeletedNetworkInterfaceIds"
            case vpcInterfaceName = "vpcInterfaceName"
        }
    }

    public struct Reservation: AWSDecodableShape {
        ///  The type of currency that is used for billing. The currencyCode used for your reservation is US dollars.
        public let currencyCode: String?
        ///  The length of time that this reservation is active. MediaConnect defines this value in the offering.
        public let duration: Int?
        ///  The unit of measurement for the duration of the reservation. MediaConnect defines this value in the offering.
        public let durationUnits: DurationUnits?
        ///  The day and time that this reservation expires. This value is calculated based on the start date and time that you set and the offering's duration.
        public let end: String?
        ///  The Amazon Resource Name (ARN) that MediaConnect assigns to the offering.
        public let offeringArn: String?
        ///  A description of the offering. MediaConnect defines this value in the offering.
        public let offeringDescription: String?
        ///  The cost of a single unit. This value, in combination with priceUnits, makes up the rate. MediaConnect defines this value in the offering.
        public let pricePerUnit: String?
        ///  The unit of measurement that is used for billing. This value, in combination with pricePerUnit, makes up the rate. MediaConnect defines this value in the offering.
        public let priceUnits: PriceUnits?
        ///  The Amazon Resource Name (ARN) that MediaConnect assigns to the reservation when you purchase an offering.
        public let reservationArn: String?
        ///  The name that you assigned to the reservation when you purchased the offering.
        public let reservationName: String?
        ///  The status of your reservation.
        public let reservationState: ReservationState?
        ///  A definition of the amount of outbound bandwidth that you would be reserving if you purchase the offering. MediaConnect defines the values that make up the resourceSpecification in the offering.
        public let resourceSpecification: ResourceSpecification?
        ///  The day and time that the reservation becomes active. You set this value when you purchase the offering.
        public let start: String?

        @inlinable
        public init(currencyCode: String? = nil, duration: Int? = nil, durationUnits: DurationUnits? = nil, end: String? = nil, offeringArn: String? = nil, offeringDescription: String? = nil, pricePerUnit: String? = nil, priceUnits: PriceUnits? = nil, reservationArn: String? = nil, reservationName: String? = nil, reservationState: ReservationState? = nil, resourceSpecification: ResourceSpecification? = nil, start: String? = nil) {
            self.currencyCode = currencyCode
            self.duration = duration
            self.durationUnits = durationUnits
            self.end = end
            self.offeringArn = offeringArn
            self.offeringDescription = offeringDescription
            self.pricePerUnit = pricePerUnit
            self.priceUnits = priceUnits
            self.reservationArn = reservationArn
            self.reservationName = reservationName
            self.reservationState = reservationState
            self.resourceSpecification = resourceSpecification
            self.start = start
        }

        private enum CodingKeys: String, CodingKey {
            case currencyCode = "currencyCode"
            case duration = "duration"
            case durationUnits = "durationUnits"
            case end = "end"
            case offeringArn = "offeringArn"
            case offeringDescription = "offeringDescription"
            case pricePerUnit = "pricePerUnit"
            case priceUnits = "priceUnits"
            case reservationArn = "reservationArn"
            case reservationName = "reservationName"
            case reservationState = "reservationState"
            case resourceSpecification = "resourceSpecification"
            case start = "start"
        }
    }

    public struct ResourceSpecification: AWSDecodableShape {
        ///  The amount of outbound bandwidth that is discounted in the offering.
        public let reservedBitrate: Int?
        ///  The type of resource and the unit that is being billed for.
        public let resourceType: ResourceType?

        @inlinable
        public init(reservedBitrate: Int? = nil, resourceType: ResourceType? = nil) {
            self.reservedBitrate = reservedBitrate
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case reservedBitrate = "reservedBitrate"
            case resourceType = "resourceType"
        }
    }

    public struct RevokeFlowEntitlementRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the entitlement that you want to revoke.
        public let entitlementArn: String
        ///  The flow that you want to revoke an entitlement from.
        public let flowArn: String

        @inlinable
        public init(entitlementArn: String, flowArn: String) {
            self.entitlementArn = entitlementArn
            self.flowArn = flowArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.entitlementArn, key: "EntitlementArn")
            request.encodePath(self.flowArn, key: "FlowArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct RevokeFlowEntitlementResponse: AWSDecodableShape {
        ///  The ARN of the entitlement that was revoked.
        public let entitlementArn: String?
        ///  The ARN of the flow that the entitlement was revoked from.
        public let flowArn: String?

        @inlinable
        public init(entitlementArn: String? = nil, flowArn: String? = nil) {
            self.entitlementArn = entitlementArn
            self.flowArn = flowArn
        }

        private enum CodingKeys: String, CodingKey {
            case entitlementArn = "entitlementArn"
            case flowArn = "flowArn"
        }
    }

    public struct SetGatewayBridgeSourceRequest: AWSEncodableShape {
        ///  The ARN of the bridge feeding this flow.
        public let bridgeArn: String?
        ///  The name of the VPC interface attachment to use for this bridge source.
        public let vpcInterfaceAttachment: VpcInterfaceAttachment?

        @inlinable
        public init(bridgeArn: String? = nil, vpcInterfaceAttachment: VpcInterfaceAttachment? = nil) {
            self.bridgeArn = bridgeArn
            self.vpcInterfaceAttachment = vpcInterfaceAttachment
        }

        private enum CodingKeys: String, CodingKey {
            case bridgeArn = "bridgeArn"
            case vpcInterfaceAttachment = "vpcInterfaceAttachment"
        }
    }

    public struct SetSourceRequest: AWSEncodableShape {
        ///  The type of encryption that is used on the content ingested from this source. Allowable encryption types: static-key.
        public let decryption: Encryption?
        ///  A description for the source. This value is not used or seen outside of the current MediaConnect account.
        public let description: String?
        ///  The ARN of the entitlement that allows you to subscribe to this flow. The entitlement is set by the flow originator, and the ARN is generated as part of the originator's flow.
        public let entitlementArn: String?
        ///  The source configuration for cloud flows receiving a stream from a bridge.
        public let gatewayBridgeSource: SetGatewayBridgeSourceRequest?
        ///  The port that the flow will be listening on for incoming content.
        public let ingestPort: Int?
        ///  The smoothing max bitrate (in bps) for RIST, RTP, and RTP-FEC streams.
        public let maxBitrate: Int?
        ///  The maximum latency in milliseconds. This parameter applies only to RIST-based and Zixi-based streams.
        public let maxLatency: Int?
        ///  The size of the buffer (in milliseconds) to use to sync incoming source data.
        public let maxSyncBuffer: Int?
        ///  The media streams that are associated with the source, and the parameters for those associations.
        public let mediaStreamSourceConfigurations: [MediaStreamSourceConfigurationRequest]?
        ///  The minimum latency in milliseconds for SRT-based streams. In streams that use the SRT protocol, this value that you set on your MediaConnect source or output represents the minimal potential latency of that connection. The latency of the stream is set to the highest number between the sender’s minimum latency and the receiver’s minimum latency.
        public let minLatency: Int?
        ///  The name of the source.
        public let name: String?
        ///  The protocol that is used by the source.  Elemental MediaConnect no longer supports the Fujitsu QoS protocol. This reference is maintained for legacy purposes only.
        public let `protocol`: `Protocol`?
        ///  The port that the flow uses to send outbound requests to initiate connection with the sender.
        public let senderControlPort: Int?
        ///  The IP address that the flow communicates with to initiate connection with the sender.
        public let senderIpAddress: String?
        ///  Source IP or domain name for SRT-caller protocol.
        public let sourceListenerAddress: String?
        ///  Source port for SRT-caller protocol.
        public let sourceListenerPort: Int?
        ///  The key-value pairs that can be used to tag and organize the source.
        public let sourceTags: [String: String]?
        ///  The stream ID that you want to use for this transport. This parameter applies only to Zixi and SRT caller-based streams.
        public let streamId: String?
        ///  The name of the VPC interface to use for this source.
        public let vpcInterfaceName: String?
        ///  The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
        public let whitelistCidr: String?

        @inlinable
        public init(decryption: Encryption? = nil, description: String? = nil, entitlementArn: String? = nil, gatewayBridgeSource: SetGatewayBridgeSourceRequest? = nil, ingestPort: Int? = nil, maxBitrate: Int? = nil, maxLatency: Int? = nil, maxSyncBuffer: Int? = nil, mediaStreamSourceConfigurations: [MediaStreamSourceConfigurationRequest]? = nil, minLatency: Int? = nil, name: String? = nil, protocol: `Protocol`? = nil, senderControlPort: Int? = nil, senderIpAddress: String? = nil, sourceListenerAddress: String? = nil, sourceListenerPort: Int? = nil, sourceTags: [String: String]? = nil, streamId: String? = nil, vpcInterfaceName: String? = nil, whitelistCidr: String? = nil) {
            self.decryption = decryption
            self.description = description
            self.entitlementArn = entitlementArn
            self.gatewayBridgeSource = gatewayBridgeSource
            self.ingestPort = ingestPort
            self.maxBitrate = maxBitrate
            self.maxLatency = maxLatency
            self.maxSyncBuffer = maxSyncBuffer
            self.mediaStreamSourceConfigurations = mediaStreamSourceConfigurations
            self.minLatency = minLatency
            self.name = name
            self.`protocol` = `protocol`
            self.senderControlPort = senderControlPort
            self.senderIpAddress = senderIpAddress
            self.sourceListenerAddress = sourceListenerAddress
            self.sourceListenerPort = sourceListenerPort
            self.sourceTags = sourceTags
            self.streamId = streamId
            self.vpcInterfaceName = vpcInterfaceName
            self.whitelistCidr = whitelistCidr
        }

        private enum CodingKeys: String, CodingKey {
            case decryption = "decryption"
            case description = "description"
            case entitlementArn = "entitlementArn"
            case gatewayBridgeSource = "gatewayBridgeSource"
            case ingestPort = "ingestPort"
            case maxBitrate = "maxBitrate"
            case maxLatency = "maxLatency"
            case maxSyncBuffer = "maxSyncBuffer"
            case mediaStreamSourceConfigurations = "mediaStreamSourceConfigurations"
            case minLatency = "minLatency"
            case name = "name"
            case `protocol` = "protocol"
            case senderControlPort = "senderControlPort"
            case senderIpAddress = "senderIpAddress"
            case sourceListenerAddress = "sourceListenerAddress"
            case sourceListenerPort = "sourceListenerPort"
            case sourceTags = "sourceTags"
            case streamId = "streamId"
            case vpcInterfaceName = "vpcInterfaceName"
            case whitelistCidr = "whitelistCidr"
        }
    }

    public struct SilentAudio: AWSEncodableShape & AWSDecodableShape {
        /// Indicates whether the SilentAudio metric is enabled or disabled.
        public let state: State?
        /// Specifies the number of consecutive seconds of silence that triggers an event or alert.
        public let thresholdSeconds: Int?

        @inlinable
        public init(state: State? = nil, thresholdSeconds: Int? = nil) {
            self.state = state
            self.thresholdSeconds = thresholdSeconds
        }

        private enum CodingKeys: String, CodingKey {
            case state = "state"
            case thresholdSeconds = "thresholdSeconds"
        }
    }

    public struct Source: AWSDecodableShape {
        ///  Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
        public let dataTransferSubscriberFeePercent: Int?
        ///  The type of encryption that is used on the content ingested from this source.
        public let decryption: Encryption?
        ///  A description for the source. This value is not used or seen outside of the current MediaConnect account.
        public let description: String?
        ///  The ARN of the entitlement that allows you to subscribe to content that comes from another Amazon Web Services account. The entitlement is set by the content originator and the ARN is generated as part of the originator's flow.
        public let entitlementArn: String?
        ///  The source configuration for cloud flows receiving a stream from a bridge.
        public let gatewayBridgeSource: GatewayBridgeSource?
        ///  The IP address that the flow will be listening on for incoming content.
        public let ingestIp: String?
        ///  The port that the flow will be listening on for incoming content.
        public let ingestPort: Int?
        ///  The media streams that are associated with the source, and the parameters for those associations.
        public let mediaStreamSourceConfigurations: [MediaStreamSourceConfiguration]?
        ///  The name of the source.
        public let name: String?
        /// The IP address of the device that is currently sending content to this source.     For sources that use protocols where you specify the origin (such as SRT Caller), this value matches the configured origin address.    For sources that use listener protocols (such as SRT Listener or RTP), this value shows the address of the connected sender.    Peer IP addresses aren't available for entitlements and CDI/ST2110 sources.   The peer IP address might not be visible for flows that haven't been started yet, or flows that were started before May 2025. In these cases, restart your flow to see the peer IP address.
        public let peerIpAddress: String?
        ///  The IP address that the flow communicates with to initiate connection with the sender.
        public let senderControlPort: Int?
        ///  The port that the flow uses to send outbound requests to initiate connection with the sender.
        public let senderIpAddress: String?
        ///  The ARN of the source.
        public let sourceArn: String?
        ///  Attributes related to the transport stream that are used in the source.
        public let transport: Transport?
        ///  The name of the VPC interface that is used for this source.
        public let vpcInterfaceName: String?
        ///  The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
        public let whitelistCidr: String?

        @inlinable
        public init(dataTransferSubscriberFeePercent: Int? = nil, decryption: Encryption? = nil, description: String? = nil, entitlementArn: String? = nil, gatewayBridgeSource: GatewayBridgeSource? = nil, ingestIp: String? = nil, ingestPort: Int? = nil, mediaStreamSourceConfigurations: [MediaStreamSourceConfiguration]? = nil, name: String? = nil, peerIpAddress: String? = nil, senderControlPort: Int? = nil, senderIpAddress: String? = nil, sourceArn: String? = nil, transport: Transport? = nil, vpcInterfaceName: String? = nil, whitelistCidr: String? = nil) {
            self.dataTransferSubscriberFeePercent = dataTransferSubscriberFeePercent
            self.decryption = decryption
            self.description = description
            self.entitlementArn = entitlementArn
            self.gatewayBridgeSource = gatewayBridgeSource
            self.ingestIp = ingestIp
            self.ingestPort = ingestPort
            self.mediaStreamSourceConfigurations = mediaStreamSourceConfigurations
            self.name = name
            self.peerIpAddress = peerIpAddress
            self.senderControlPort = senderControlPort
            self.senderIpAddress = senderIpAddress
            self.sourceArn = sourceArn
            self.transport = transport
            self.vpcInterfaceName = vpcInterfaceName
            self.whitelistCidr = whitelistCidr
        }

        private enum CodingKeys: String, CodingKey {
            case dataTransferSubscriberFeePercent = "dataTransferSubscriberFeePercent"
            case decryption = "decryption"
            case description = "description"
            case entitlementArn = "entitlementArn"
            case gatewayBridgeSource = "gatewayBridgeSource"
            case ingestIp = "ingestIp"
            case ingestPort = "ingestPort"
            case mediaStreamSourceConfigurations = "mediaStreamSourceConfigurations"
            case name = "name"
            case peerIpAddress = "peerIpAddress"
            case senderControlPort = "senderControlPort"
            case senderIpAddress = "senderIpAddress"
            case sourceArn = "sourceArn"
            case transport = "transport"
            case vpcInterfaceName = "vpcInterfaceName"
            case whitelistCidr = "whitelistCidr"
        }
    }

    public struct SourcePriority: AWSEncodableShape & AWSDecodableShape {
        ///  The name of the source you choose as the primary source for this flow.
        public let primarySource: String?

        @inlinable
        public init(primarySource: String? = nil) {
            self.primarySource = primarySource
        }

        private enum CodingKeys: String, CodingKey {
            case primarySource = "primarySource"
        }
    }

    public struct StartFlowRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the flow that you want to start.
        public let flowArn: String

        @inlinable
        public init(flowArn: String) {
            self.flowArn = flowArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.flowArn, key: "FlowArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct StartFlowResponse: AWSDecodableShape {
        ///  The ARN of the flow that you started.
        public let flowArn: String?
        ///  The status of the flow when the StartFlow process begins.
        public let status: Status?

        @inlinable
        public init(flowArn: String? = nil, status: Status? = nil) {
            self.flowArn = flowArn
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case status = "status"
        }
    }

    public struct StopFlowRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the flow that you want to stop.
        public let flowArn: String

        @inlinable
        public init(flowArn: String) {
            self.flowArn = flowArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.flowArn, key: "FlowArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct StopFlowResponse: AWSDecodableShape {
        ///  The ARN of the flow that you stopped.
        public let flowArn: String?
        ///  The status of the flow when the StopFlow process begins.
        public let status: Status?

        @inlinable
        public init(flowArn: String? = nil, status: Status? = nil) {
            self.flowArn = flowArn
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case status = "status"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) that identifies the MediaConnect resource to which to add tags.
        public let resourceArn: String
        ///  A map from tag keys to values. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
        public let tags: [String: String]?

        @inlinable
        public init(resourceArn: String, tags: [String: String]? = nil) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "ResourceArn")
            try container.encodeIfPresent(self.tags, forKey: .tags)
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
        }
    }

    public struct ThumbnailDetails: AWSDecodableShape {
        ///  The ARN of the flow that DescribeFlowSourceThumbnail was performed on.
        public let flowArn: String?
        /// Thumbnail Base64 string.
        public let thumbnail: String?
        ///  Status code and messages about the flow source thumbnail.
        public let thumbnailMessages: [MessageDetail]?
        ///  Timecode of thumbnail.
        public let timecode: String?
        ///  The timestamp of when thumbnail was generated.
        public let timestamp: Date?

        @inlinable
        public init(flowArn: String? = nil, thumbnail: String? = nil, thumbnailMessages: [MessageDetail]? = nil, timecode: String? = nil, timestamp: Date? = nil) {
            self.flowArn = flowArn
            self.thumbnail = thumbnail
            self.thumbnailMessages = thumbnailMessages
            self.timecode = timecode
            self.timestamp = timestamp
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case thumbnail = "thumbnail"
            case thumbnailMessages = "thumbnailMessages"
            case timecode = "timecode"
            case timestamp = "timestamp"
        }
    }

    public struct Transport: AWSDecodableShape {
        ///  The range of IP addresses that should be allowed to initiate output requests to this flow. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16
        public let cidrAllowList: [String]?
        ///  The smoothing max bitrate (in bps) for RIST, RTP, and RTP-FEC streams.
        public let maxBitrate: Int?
        ///  The maximum latency in milliseconds. This parameter applies only to RIST-based and Zixi-based streams.
        public let maxLatency: Int?
        ///  The size of the buffer (in milliseconds) to use to sync incoming source data.
        public let maxSyncBuffer: Int?
        ///  The minimum latency in milliseconds for SRT-based streams. In streams that use the SRT protocol, this value that you set on your MediaConnect source or output represents the minimal potential latency of that connection. The latency of the stream is set to the highest number between the sender’s minimum latency and the receiver’s minimum latency.
        public let minLatency: Int?
        /// A suffix for the names of the NDI sources that the flow creates. If a custom name isn't specified, MediaConnect uses the output name.
        public let ndiProgramName: String?
        /// A quality setting for the NDI Speed HQ encoder.
        public let ndiSpeedHqQuality: Int?
        ///  The protocol that is used by the source or output.  Elemental MediaConnect no longer supports the Fujitsu QoS protocol. This reference is maintained for legacy purposes only.
        public let `protocol`: `Protocol`?
        ///  The remote ID for the Zixi-pull stream.
        public let remoteId: String?
        ///  The port that the flow uses to send outbound requests to initiate connection with the sender.
        public let senderControlPort: Int?
        ///  The IP address that the flow communicates with to initiate connection with the sender.
        public let senderIpAddress: String?
        ///  The smoothing latency in milliseconds for RIST, RTP, and RTP-FEC streams.
        public let smoothingLatency: Int?
        ///  Source IP or domain name for SRT-caller protocol.
        public let sourceListenerAddress: String?
        ///  Source port for SRT-caller protocol.
        public let sourceListenerPort: Int?
        ///  The stream ID that you want to use for this transport. This parameter applies only to Zixi and SRT caller-based streams.
        public let streamId: String?

        @inlinable
        public init(cidrAllowList: [String]? = nil, maxBitrate: Int? = nil, maxLatency: Int? = nil, maxSyncBuffer: Int? = nil, minLatency: Int? = nil, ndiProgramName: String? = nil, ndiSpeedHqQuality: Int? = nil, protocol: `Protocol`? = nil, remoteId: String? = nil, senderControlPort: Int? = nil, senderIpAddress: String? = nil, smoothingLatency: Int? = nil, sourceListenerAddress: String? = nil, sourceListenerPort: Int? = nil, streamId: String? = nil) {
            self.cidrAllowList = cidrAllowList
            self.maxBitrate = maxBitrate
            self.maxLatency = maxLatency
            self.maxSyncBuffer = maxSyncBuffer
            self.minLatency = minLatency
            self.ndiProgramName = ndiProgramName
            self.ndiSpeedHqQuality = ndiSpeedHqQuality
            self.`protocol` = `protocol`
            self.remoteId = remoteId
            self.senderControlPort = senderControlPort
            self.senderIpAddress = senderIpAddress
            self.smoothingLatency = smoothingLatency
            self.sourceListenerAddress = sourceListenerAddress
            self.sourceListenerPort = sourceListenerPort
            self.streamId = streamId
        }

        private enum CodingKeys: String, CodingKey {
            case cidrAllowList = "cidrAllowList"
            case maxBitrate = "maxBitrate"
            case maxLatency = "maxLatency"
            case maxSyncBuffer = "maxSyncBuffer"
            case minLatency = "minLatency"
            case ndiProgramName = "ndiProgramName"
            case ndiSpeedHqQuality = "ndiSpeedHqQuality"
            case `protocol` = "protocol"
            case remoteId = "remoteId"
            case senderControlPort = "senderControlPort"
            case senderIpAddress = "senderIpAddress"
            case smoothingLatency = "smoothingLatency"
            case sourceListenerAddress = "sourceListenerAddress"
            case sourceListenerPort = "sourceListenerPort"
            case streamId = "streamId"
        }
    }

    public struct TransportMediaInfo: AWSDecodableShape {
        ///  The list of transport stream programs in the current flow's source.
        public let programs: [TransportStreamProgram]?

        @inlinable
        public init(programs: [TransportStreamProgram]? = nil) {
            self.programs = programs
        }

        private enum CodingKeys: String, CodingKey {
            case programs = "programs"
        }
    }

    public struct TransportStream: AWSDecodableShape {
        ///  The number of channels in the audio stream.
        public let channels: Int?
        ///  The codec used by the stream.
        public let codec: String?
        ///  The frame rate used by the video stream.
        public let frameRate: String?
        /// The frame resolution used by the video stream.
        public let frameResolution: FrameResolution?
        ///  The Packet ID (PID) as it is reported in the Program Map Table.
        public let pid: Int?
        ///  The sample rate used by the audio stream.
        public let sampleRate: Int?
        ///  The sample bit size used by the audio stream.
        public let sampleSize: Int?
        ///  The Stream Type as it is reported in the Program Map Table.
        public let streamType: String?

        @inlinable
        public init(channels: Int? = nil, codec: String? = nil, frameRate: String? = nil, frameResolution: FrameResolution? = nil, pid: Int? = nil, sampleRate: Int? = nil, sampleSize: Int? = nil, streamType: String? = nil) {
            self.channels = channels
            self.codec = codec
            self.frameRate = frameRate
            self.frameResolution = frameResolution
            self.pid = pid
            self.sampleRate = sampleRate
            self.sampleSize = sampleSize
            self.streamType = streamType
        }

        private enum CodingKeys: String, CodingKey {
            case channels = "channels"
            case codec = "codec"
            case frameRate = "frameRate"
            case frameResolution = "frameResolution"
            case pid = "pid"
            case sampleRate = "sampleRate"
            case sampleSize = "sampleSize"
            case streamType = "streamType"
        }
    }

    public struct TransportStreamProgram: AWSDecodableShape {
        ///  The Program Clock Reference (PCR) Packet ID (PID) as it is reported in the Program Association Table.
        public let pcrPid: Int?
        ///  The program name as it is reported in the Program Association Table.
        public let programName: String?
        ///  The program number as it is reported in the Program Association Table.
        public let programNumber: Int?
        ///  The program Packet ID (PID) as it is reported in the Program Association Table.
        public let programPid: Int?
        ///  The list of elementary transport streams in the program. The list includes video, audio, and data streams.
        public let streams: [TransportStream]?

        @inlinable
        public init(pcrPid: Int? = nil, programName: String? = nil, programNumber: Int? = nil, programPid: Int? = nil, streams: [TransportStream]? = nil) {
            self.pcrPid = pcrPid
            self.programName = programName
            self.programNumber = programNumber
            self.programPid = programPid
            self.streams = streams
        }

        private enum CodingKeys: String, CodingKey {
            case pcrPid = "pcrPid"
            case programName = "programName"
            case programNumber = "programNumber"
            case programPid = "programPid"
            case streams = "streams"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the resource that you want to untag.
        public let resourceArn: String
        /// The keys of the tags to be removed.
        public let tagKeys: [String]?

        @inlinable
        public init(resourceArn: String, tagKeys: [String]? = nil) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "ResourceArn")
            request.encodeQuery(self.tagKeys, key: "tagKeys")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UpdateBridgeFlowSourceRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) that identifies the MediaConnect resource from which to delete tags.
        public let flowArn: String?
        /// The name of the VPC interface attachment to use for this source.
        public let flowVpcInterfaceAttachment: VpcInterfaceAttachment?

        @inlinable
        public init(flowArn: String? = nil, flowVpcInterfaceAttachment: VpcInterfaceAttachment? = nil) {
            self.flowArn = flowArn
            self.flowVpcInterfaceAttachment = flowVpcInterfaceAttachment
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case flowVpcInterfaceAttachment = "flowVpcInterfaceAttachment"
        }
    }

    public struct UpdateBridgeNetworkOutputRequest: AWSEncodableShape {
        /// The network output IP Address.
        public let ipAddress: String?
        /// The network output's gateway network name.
        public let networkName: String?
        /// The network output port.
        public let port: Int?
        /// The network output protocol.   Elemental MediaConnect no longer supports the Fujitsu QoS protocol. This reference is maintained for legacy purposes only.
        public let `protocol`: `Protocol`?
        /// The network output TTL.
        public let ttl: Int?

        @inlinable
        public init(ipAddress: String? = nil, networkName: String? = nil, port: Int? = nil, protocol: `Protocol`? = nil, ttl: Int? = nil) {
            self.ipAddress = ipAddress
            self.networkName = networkName
            self.port = port
            self.`protocol` = `protocol`
            self.ttl = ttl
        }

        private enum CodingKeys: String, CodingKey {
            case ipAddress = "ipAddress"
            case networkName = "networkName"
            case port = "port"
            case `protocol` = "protocol"
            case ttl = "ttl"
        }
    }

    public struct UpdateBridgeNetworkSourceRequest: AWSEncodableShape {
        ///  The network source multicast IP.
        public let multicastIp: String?
        /// The settings related to the multicast source.
        public let multicastSourceSettings: MulticastSourceSettings?
        /// The network source's gateway network name.
        public let networkName: String?
        /// The network source port.
        public let port: Int?
        /// The network source protocol.   Elemental MediaConnect no longer supports the Fujitsu QoS protocol. This reference is maintained for legacy purposes only.
        public let `protocol`: `Protocol`?

        @inlinable
        public init(multicastIp: String? = nil, multicastSourceSettings: MulticastSourceSettings? = nil, networkName: String? = nil, port: Int? = nil, protocol: `Protocol`? = nil) {
            self.multicastIp = multicastIp
            self.multicastSourceSettings = multicastSourceSettings
            self.networkName = networkName
            self.port = port
            self.`protocol` = `protocol`
        }

        private enum CodingKeys: String, CodingKey {
            case multicastIp = "multicastIp"
            case multicastSourceSettings = "multicastSourceSettings"
            case networkName = "networkName"
            case port = "port"
            case `protocol` = "protocol"
        }
    }

    public struct UpdateBridgeOutputRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the bridge that you want to update.
        public let bridgeArn: String
        ///  The network of the bridge output.
        public let networkOutput: UpdateBridgeNetworkOutputRequest?
        ///  Tname of the output that you want to update.
        public let outputName: String

        @inlinable
        public init(bridgeArn: String, networkOutput: UpdateBridgeNetworkOutputRequest? = nil, outputName: String) {
            self.bridgeArn = bridgeArn
            self.networkOutput = networkOutput
            self.outputName = outputName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.bridgeArn, key: "BridgeArn")
            try container.encodeIfPresent(self.networkOutput, forKey: .networkOutput)
            request.encodePath(self.outputName, key: "OutputName")
        }

        private enum CodingKeys: String, CodingKey {
            case networkOutput = "networkOutput"
        }
    }

    public struct UpdateBridgeOutputResponse: AWSDecodableShape {
        ///  The ARN of the bridge that was updated.
        public let bridgeArn: String?
        ///  The bridge output that was updated.
        public let output: BridgeOutput?

        @inlinable
        public init(bridgeArn: String? = nil, output: BridgeOutput? = nil) {
            self.bridgeArn = bridgeArn
            self.output = output
        }

        private enum CodingKeys: String, CodingKey {
            case bridgeArn = "bridgeArn"
            case output = "output"
        }
    }

    public struct UpdateBridgeRequest: AWSEncodableShape {
        ///  TheAmazon Resource Name (ARN) of the bridge that you want to update.
        public let bridgeArn: String
        ///  A cloud-to-ground bridge. The content comes from an existing MediaConnect flow and is delivered to your premises.
        public let egressGatewayBridge: UpdateEgressGatewayBridgeRequest?
        ///  A ground-to-cloud bridge. The content originates at your premises and is delivered to the cloud.
        public let ingressGatewayBridge: UpdateIngressGatewayBridgeRequest?
        ///  The settings for source failover.
        public let sourceFailoverConfig: UpdateFailoverConfig?

        @inlinable
        public init(bridgeArn: String, egressGatewayBridge: UpdateEgressGatewayBridgeRequest? = nil, ingressGatewayBridge: UpdateIngressGatewayBridgeRequest? = nil, sourceFailoverConfig: UpdateFailoverConfig? = nil) {
            self.bridgeArn = bridgeArn
            self.egressGatewayBridge = egressGatewayBridge
            self.ingressGatewayBridge = ingressGatewayBridge
            self.sourceFailoverConfig = sourceFailoverConfig
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.bridgeArn, key: "BridgeArn")
            try container.encodeIfPresent(self.egressGatewayBridge, forKey: .egressGatewayBridge)
            try container.encodeIfPresent(self.ingressGatewayBridge, forKey: .ingressGatewayBridge)
            try container.encodeIfPresent(self.sourceFailoverConfig, forKey: .sourceFailoverConfig)
        }

        private enum CodingKeys: String, CodingKey {
            case egressGatewayBridge = "egressGatewayBridge"
            case ingressGatewayBridge = "ingressGatewayBridge"
            case sourceFailoverConfig = "sourceFailoverConfig"
        }
    }

    public struct UpdateBridgeResponse: AWSDecodableShape {
        ///  The bridge that was updated.
        public let bridge: Bridge?

        @inlinable
        public init(bridge: Bridge? = nil) {
            self.bridge = bridge
        }

        private enum CodingKeys: String, CodingKey {
            case bridge = "bridge"
        }
    }

    public struct UpdateBridgeSourceRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the bridge that you want to update.
        public let bridgeArn: String
        ///  The name of the flow that you want to update.
        public let flowSource: UpdateBridgeFlowSourceRequest?
        ///  The network for the bridge source.
        public let networkSource: UpdateBridgeNetworkSourceRequest?
        ///  The name of the source that you want to update.
        public let sourceName: String

        @inlinable
        public init(bridgeArn: String, flowSource: UpdateBridgeFlowSourceRequest? = nil, networkSource: UpdateBridgeNetworkSourceRequest? = nil, sourceName: String) {
            self.bridgeArn = bridgeArn
            self.flowSource = flowSource
            self.networkSource = networkSource
            self.sourceName = sourceName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.bridgeArn, key: "BridgeArn")
            try container.encodeIfPresent(self.flowSource, forKey: .flowSource)
            try container.encodeIfPresent(self.networkSource, forKey: .networkSource)
            request.encodePath(self.sourceName, key: "SourceName")
        }

        private enum CodingKeys: String, CodingKey {
            case flowSource = "flowSource"
            case networkSource = "networkSource"
        }
    }

    public struct UpdateBridgeSourceResponse: AWSDecodableShape {
        ///  The ARN of the updated bridge source.
        public let bridgeArn: String?
        ///  The updated bridge source.
        public let source: BridgeSource?

        @inlinable
        public init(bridgeArn: String? = nil, source: BridgeSource? = nil) {
            self.bridgeArn = bridgeArn
            self.source = source
        }

        private enum CodingKeys: String, CodingKey {
            case bridgeArn = "bridgeArn"
            case source = "source"
        }
    }

    public struct UpdateBridgeStateRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the bridge that you want to update the state of.
        public let bridgeArn: String
        ///  The desired state for the bridge.
        public let desiredState: DesiredState?

        @inlinable
        public init(bridgeArn: String, desiredState: DesiredState? = nil) {
            self.bridgeArn = bridgeArn
            self.desiredState = desiredState
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.bridgeArn, key: "BridgeArn")
            try container.encodeIfPresent(self.desiredState, forKey: .desiredState)
        }

        private enum CodingKeys: String, CodingKey {
            case desiredState = "desiredState"
        }
    }

    public struct UpdateBridgeStateResponse: AWSDecodableShape {
        /// The ARN of the updated bridge.
        public let bridgeArn: String?
        ///  The new state of the bridge.
        public let desiredState: DesiredState?

        @inlinable
        public init(bridgeArn: String? = nil, desiredState: DesiredState? = nil) {
            self.bridgeArn = bridgeArn
            self.desiredState = desiredState
        }

        private enum CodingKeys: String, CodingKey {
            case bridgeArn = "bridgeArn"
            case desiredState = "desiredState"
        }
    }

    public struct UpdateEgressGatewayBridgeRequest: AWSEncodableShape {
        /// The maximum expected bitrate (in bps).
        public let maxBitrate: Int?

        @inlinable
        public init(maxBitrate: Int? = nil) {
            self.maxBitrate = maxBitrate
        }

        private enum CodingKeys: String, CodingKey {
            case maxBitrate = "maxBitrate"
        }
    }

    public struct UpdateEncryption: AWSEncodableShape {
        ///  The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256).
        public let algorithm: Algorithm?
        ///  A 128-bit, 16-byte hex value represented by a 32-character string, to be used with the key for encrypting content. This parameter is not valid for static key encryption.
        public let constantInitializationVector: String?
        ///  The value of one of the devices that you configured with your digital rights management (DRM) platform key provider. This parameter is required for SPEKE encryption and is not valid for static key encryption.
        public let deviceId: String?
        ///  The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key).
        public let keyType: KeyType?
        ///  The Amazon Web Services Region that the API Gateway proxy endpoint was created in. This parameter is required for SPEKE encryption and is not valid for static key encryption.
        public let region: String?
        ///  An identifier for the content. The service sends this value to the key server to identify the current endpoint. The resource ID is also known as the content ID. This parameter is required for SPEKE encryption and is not valid for static key encryption.
        public let resourceId: String?
        ///  The ARN of the role that you created during setup (when you set up MediaConnect as a trusted entity).
        public let roleArn: String?
        ///  The ARN of the secret that you created in Secrets Manager to store the encryption key. This parameter is required for static key encryption and is not valid for SPEKE encryption.
        public let secretArn: String?
        ///  The URL from the API Gateway proxy that you set up to talk to your key server. This parameter is required for SPEKE encryption and is not valid for static key encryption.
        public let url: String?

        @inlinable
        public init(algorithm: Algorithm? = nil, constantInitializationVector: String? = nil, deviceId: String? = nil, keyType: KeyType? = nil, region: String? = nil, resourceId: String? = nil, roleArn: String? = nil, secretArn: String? = nil, url: String? = nil) {
            self.algorithm = algorithm
            self.constantInitializationVector = constantInitializationVector
            self.deviceId = deviceId
            self.keyType = keyType
            self.region = region
            self.resourceId = resourceId
            self.roleArn = roleArn
            self.secretArn = secretArn
            self.url = url
        }

        private enum CodingKeys: String, CodingKey {
            case algorithm = "algorithm"
            case constantInitializationVector = "constantInitializationVector"
            case deviceId = "deviceId"
            case keyType = "keyType"
            case region = "region"
            case resourceId = "resourceId"
            case roleArn = "roleArn"
            case secretArn = "secretArn"
            case url = "url"
        }
    }

    public struct UpdateFailoverConfig: AWSEncodableShape {
        ///  The type of failover you choose for this flow. MERGE combines the source streams into a single stream, allowing graceful recovery from any single-source loss. FAILOVER allows switching between different streams.
        public let failoverMode: FailoverMode?
        ///  Recovery window time to look for dash-7 packets.
        public let recoveryWindow: Int?
        ///  The priority you want to assign to a source. You can have a primary stream and a backup stream or two equally prioritized streams.
        public let sourcePriority: SourcePriority?
        /// The state of source failover on the flow. If the state is inactive, the flow can have only one source. If the state is active, the flow can have one or two sources.
        public let state: State?

        @inlinable
        public init(failoverMode: FailoverMode? = nil, recoveryWindow: Int? = nil, sourcePriority: SourcePriority? = nil, state: State? = nil) {
            self.failoverMode = failoverMode
            self.recoveryWindow = recoveryWindow
            self.sourcePriority = sourcePriority
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case failoverMode = "failoverMode"
            case recoveryWindow = "recoveryWindow"
            case sourcePriority = "sourcePriority"
            case state = "state"
        }
    }

    public struct UpdateFlowEntitlementRequest: AWSEncodableShape {
        ///  A description of the entitlement. This description appears only on the MediaConnect console and will not be seen by the subscriber or end user.
        public let description: String?
        ///  The type of encryption that will be used on the output associated with this entitlement. Allowable encryption types: static-key, speke.
        public let encryption: UpdateEncryption?
        ///  The Amazon Resource Name (ARN) of the entitlement that you want to update.
        public let entitlementArn: String
        ///  An indication of whether you want to enable the entitlement to allow access, or disable it to stop streaming content to the subscriber’s flow temporarily. If you don’t specify the entitlementStatus field in your request, MediaConnect leaves the value unchanged.
        public let entitlementStatus: EntitlementStatus?
        ///  The ARN of the flow that is associated with the entitlement that you want to update.
        public let flowArn: String
        ///  The Amazon Web Services account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source.
        public let subscribers: [String]?

        @inlinable
        public init(description: String? = nil, encryption: UpdateEncryption? = nil, entitlementArn: String, entitlementStatus: EntitlementStatus? = nil, flowArn: String, subscribers: [String]? = nil) {
            self.description = description
            self.encryption = encryption
            self.entitlementArn = entitlementArn
            self.entitlementStatus = entitlementStatus
            self.flowArn = flowArn
            self.subscribers = subscribers
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.description, forKey: .description)
            try container.encodeIfPresent(self.encryption, forKey: .encryption)
            request.encodePath(self.entitlementArn, key: "EntitlementArn")
            try container.encodeIfPresent(self.entitlementStatus, forKey: .entitlementStatus)
            request.encodePath(self.flowArn, key: "FlowArn")
            try container.encodeIfPresent(self.subscribers, forKey: .subscribers)
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case encryption = "encryption"
            case entitlementStatus = "entitlementStatus"
            case subscribers = "subscribers"
        }
    }

    public struct UpdateFlowEntitlementResponse: AWSDecodableShape {
        ///  The new configuration of the entitlement that you updated.
        public let entitlement: Entitlement?
        ///  The ARN of the flow that this entitlement was granted on.
        public let flowArn: String?

        @inlinable
        public init(entitlement: Entitlement? = nil, flowArn: String? = nil) {
            self.entitlement = entitlement
            self.flowArn = flowArn
        }

        private enum CodingKeys: String, CodingKey {
            case entitlement = "entitlement"
            case flowArn = "flowArn"
        }
    }

    public struct UpdateFlowMediaStreamRequest: AWSEncodableShape {
        ///  The attributes that you want to assign to the media stream.
        public let attributes: MediaStreamAttributesRequest?
        /// The sample rate for the stream. This value in measured in kHz.
        public let clockRate: Int?
        /// A description that can help you quickly identify what your media stream is used for.
        public let description: String?
        ///  The Amazon Resource Name (ARN) of the flow that is associated with the media stream that you updated.
        public let flowArn: String
        ///  The media stream that you updated.
        public let mediaStreamName: String
        /// The type of media stream.
        public let mediaStreamType: MediaStreamType?
        /// The resolution of the video.
        public let videoFormat: String?

        @inlinable
        public init(attributes: MediaStreamAttributesRequest? = nil, clockRate: Int? = nil, description: String? = nil, flowArn: String, mediaStreamName: String, mediaStreamType: MediaStreamType? = nil, videoFormat: String? = nil) {
            self.attributes = attributes
            self.clockRate = clockRate
            self.description = description
            self.flowArn = flowArn
            self.mediaStreamName = mediaStreamName
            self.mediaStreamType = mediaStreamType
            self.videoFormat = videoFormat
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.attributes, forKey: .attributes)
            try container.encodeIfPresent(self.clockRate, forKey: .clockRate)
            try container.encodeIfPresent(self.description, forKey: .description)
            request.encodePath(self.flowArn, key: "FlowArn")
            request.encodePath(self.mediaStreamName, key: "MediaStreamName")
            try container.encodeIfPresent(self.mediaStreamType, forKey: .mediaStreamType)
            try container.encodeIfPresent(self.videoFormat, forKey: .videoFormat)
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "attributes"
            case clockRate = "clockRate"
            case description = "description"
            case mediaStreamType = "mediaStreamType"
            case videoFormat = "videoFormat"
        }
    }

    public struct UpdateFlowMediaStreamResponse: AWSDecodableShape {
        /// The ARN of the flow that is associated with the media stream that you updated.
        public let flowArn: String?
        /// The media stream that you updated.
        public let mediaStream: MediaStream?

        @inlinable
        public init(flowArn: String? = nil, mediaStream: MediaStream? = nil) {
            self.flowArn = flowArn
            self.mediaStream = mediaStream
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case mediaStream = "mediaStream"
        }
    }

    public struct UpdateFlowOutputRequest: AWSEncodableShape {
        ///  The range of IP addresses that should be allowed to initiate output requests to this flow. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
        public let cidrAllowList: [String]?
        ///  A description of the output. This description appears only on the MediaConnect console and will not be seen by the end user.
        public let description: String?
        ///  The IP address where you want to send the output.
        public let destination: String?
        ///  The type of key used for the encryption. If no keyType is provided, the service will use the default setting (static-key). Allowable encryption types: static-key.
        public let encryption: UpdateEncryption?
        ///  The Amazon Resource Name (ARN) of the flow that is associated with the output that you want to update.
        public let flowArn: String
        ///  The maximum latency in milliseconds. This parameter applies only to RIST-based and Zixi-based streams.
        public let maxLatency: Int?
        ///  The media streams that are associated with the output, and the parameters for those associations.
        public let mediaStreamOutputConfigurations: [MediaStreamOutputConfigurationRequest]?
        ///  The minimum latency in milliseconds for SRT-based streams. In streams that use the SRT protocol, this value that you set on your MediaConnect source or output represents the minimal potential latency of that connection. The latency of the stream is set to the highest number between the sender’s minimum latency and the receiver’s minimum latency.
        public let minLatency: Int?
        ///  A suffix for the names of the NDI sources that the flow creates. If a custom name isn't specified, MediaConnect uses the output name.
        public let ndiProgramName: String?
        /// A quality setting for the NDI Speed HQ encoder.
        public let ndiSpeedHqQuality: Int?
        ///  The ARN of the output that you want to update.
        public let outputArn: String
        ///  An indication of whether the output should transmit data or not. If you don't specify the outputStatus field in your request, MediaConnect leaves the value unchanged.
        public let outputStatus: OutputStatus?
        ///  The port to use when content is distributed to this output.
        public let port: Int?
        ///  The protocol to use for the output.  Elemental MediaConnect no longer supports the Fujitsu QoS protocol. This reference is maintained for legacy purposes only.
        public let `protocol`: `Protocol`?
        ///  The remote ID for the Zixi-pull stream.
        public let remoteId: String?
        ///  The port that the flow uses to send outbound requests to initiate connection with the sender.
        public let senderControlPort: Int?
        ///  The IP address that the flow communicates with to initiate connection with the sender.
        public let senderIpAddress: String?
        ///  The smoothing latency in milliseconds for RIST, RTP, and RTP-FEC streams.
        public let smoothingLatency: Int?
        ///  The stream ID that you want to use for this transport. This parameter applies only to Zixi and SRT caller-based streams.
        public let streamId: String?
        ///  The name of the VPC interface attachment to use for this output.
        public let vpcInterfaceAttachment: VpcInterfaceAttachment?

        @inlinable
        public init(cidrAllowList: [String]? = nil, description: String? = nil, destination: String? = nil, encryption: UpdateEncryption? = nil, flowArn: String, maxLatency: Int? = nil, mediaStreamOutputConfigurations: [MediaStreamOutputConfigurationRequest]? = nil, minLatency: Int? = nil, ndiProgramName: String? = nil, ndiSpeedHqQuality: Int? = nil, outputArn: String, outputStatus: OutputStatus? = nil, port: Int? = nil, protocol: `Protocol`? = nil, remoteId: String? = nil, senderControlPort: Int? = nil, senderIpAddress: String? = nil, smoothingLatency: Int? = nil, streamId: String? = nil, vpcInterfaceAttachment: VpcInterfaceAttachment? = nil) {
            self.cidrAllowList = cidrAllowList
            self.description = description
            self.destination = destination
            self.encryption = encryption
            self.flowArn = flowArn
            self.maxLatency = maxLatency
            self.mediaStreamOutputConfigurations = mediaStreamOutputConfigurations
            self.minLatency = minLatency
            self.ndiProgramName = ndiProgramName
            self.ndiSpeedHqQuality = ndiSpeedHqQuality
            self.outputArn = outputArn
            self.outputStatus = outputStatus
            self.port = port
            self.`protocol` = `protocol`
            self.remoteId = remoteId
            self.senderControlPort = senderControlPort
            self.senderIpAddress = senderIpAddress
            self.smoothingLatency = smoothingLatency
            self.streamId = streamId
            self.vpcInterfaceAttachment = vpcInterfaceAttachment
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.cidrAllowList, forKey: .cidrAllowList)
            try container.encodeIfPresent(self.description, forKey: .description)
            try container.encodeIfPresent(self.destination, forKey: .destination)
            try container.encodeIfPresent(self.encryption, forKey: .encryption)
            request.encodePath(self.flowArn, key: "FlowArn")
            try container.encodeIfPresent(self.maxLatency, forKey: .maxLatency)
            try container.encodeIfPresent(self.mediaStreamOutputConfigurations, forKey: .mediaStreamOutputConfigurations)
            try container.encodeIfPresent(self.minLatency, forKey: .minLatency)
            try container.encodeIfPresent(self.ndiProgramName, forKey: .ndiProgramName)
            try container.encodeIfPresent(self.ndiSpeedHqQuality, forKey: .ndiSpeedHqQuality)
            request.encodePath(self.outputArn, key: "OutputArn")
            try container.encodeIfPresent(self.outputStatus, forKey: .outputStatus)
            try container.encodeIfPresent(self.port, forKey: .port)
            try container.encodeIfPresent(self.`protocol`, forKey: .`protocol`)
            try container.encodeIfPresent(self.remoteId, forKey: .remoteId)
            try container.encodeIfPresent(self.senderControlPort, forKey: .senderControlPort)
            try container.encodeIfPresent(self.senderIpAddress, forKey: .senderIpAddress)
            try container.encodeIfPresent(self.smoothingLatency, forKey: .smoothingLatency)
            try container.encodeIfPresent(self.streamId, forKey: .streamId)
            try container.encodeIfPresent(self.vpcInterfaceAttachment, forKey: .vpcInterfaceAttachment)
        }

        private enum CodingKeys: String, CodingKey {
            case cidrAllowList = "cidrAllowList"
            case description = "description"
            case destination = "destination"
            case encryption = "encryption"
            case maxLatency = "maxLatency"
            case mediaStreamOutputConfigurations = "mediaStreamOutputConfigurations"
            case minLatency = "minLatency"
            case ndiProgramName = "ndiProgramName"
            case ndiSpeedHqQuality = "ndiSpeedHqQuality"
            case outputStatus = "outputStatus"
            case port = "port"
            case `protocol` = "protocol"
            case remoteId = "remoteId"
            case senderControlPort = "senderControlPort"
            case senderIpAddress = "senderIpAddress"
            case smoothingLatency = "smoothingLatency"
            case streamId = "streamId"
            case vpcInterfaceAttachment = "vpcInterfaceAttachment"
        }
    }

    public struct UpdateFlowOutputResponse: AWSDecodableShape {
        ///  The ARN of the flow that is associated with the updated output.
        public let flowArn: String?
        ///  The new settings of the output that you updated.
        public let output: Output?

        @inlinable
        public init(flowArn: String? = nil, output: Output? = nil) {
            self.flowArn = flowArn
            self.output = output
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case output = "output"
        }
    }

    public struct UpdateFlowRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the flow that you want to update.
        public let flowArn: String
        ///  Determines the processing capacity and feature set of the flow.
        public let flowSize: FlowSize?
        ///  The maintenance setting of the flow.
        public let maintenance: UpdateMaintenance?
        ///  Specifies the configuration settings for NDI outputs. Required when the flow includes NDI outputs.
        public let ndiConfig: NdiConfig?
        ///  The settings for source failover.
        public let sourceFailoverConfig: UpdateFailoverConfig?
        ///  The settings for source monitoring.
        public let sourceMonitoringConfig: MonitoringConfig?

        @inlinable
        public init(flowArn: String, flowSize: FlowSize? = nil, maintenance: UpdateMaintenance? = nil, ndiConfig: NdiConfig? = nil, sourceFailoverConfig: UpdateFailoverConfig? = nil, sourceMonitoringConfig: MonitoringConfig? = nil) {
            self.flowArn = flowArn
            self.flowSize = flowSize
            self.maintenance = maintenance
            self.ndiConfig = ndiConfig
            self.sourceFailoverConfig = sourceFailoverConfig
            self.sourceMonitoringConfig = sourceMonitoringConfig
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.flowArn, key: "FlowArn")
            try container.encodeIfPresent(self.flowSize, forKey: .flowSize)
            try container.encodeIfPresent(self.maintenance, forKey: .maintenance)
            try container.encodeIfPresent(self.ndiConfig, forKey: .ndiConfig)
            try container.encodeIfPresent(self.sourceFailoverConfig, forKey: .sourceFailoverConfig)
            try container.encodeIfPresent(self.sourceMonitoringConfig, forKey: .sourceMonitoringConfig)
        }

        private enum CodingKeys: String, CodingKey {
            case flowSize = "flowSize"
            case maintenance = "maintenance"
            case ndiConfig = "ndiConfig"
            case sourceFailoverConfig = "sourceFailoverConfig"
            case sourceMonitoringConfig = "sourceMonitoringConfig"
        }
    }

    public struct UpdateFlowResponse: AWSDecodableShape {
        ///  The updated flow.
        public let flow: Flow?

        @inlinable
        public init(flow: Flow? = nil) {
            self.flow = flow
        }

        private enum CodingKeys: String, CodingKey {
            case flow = "flow"
        }
    }

    public struct UpdateFlowSourceRequest: AWSEncodableShape {
        /// The type of encryption that is used on the content ingested from the source.
        public let decryption: UpdateEncryption?
        /// A description of the source. This description is not visible outside of the current Amazon Web Services account.
        public let description: String?
        /// The Amazon Resource Name (ARN) of the entitlement that allows you to subscribe to the flow. The entitlement is set by the content originator, and the ARN is generated as part of the originator's flow.
        public let entitlementArn: String?
        ///  The ARN of the flow that you want to update.
        public let flowArn: String
        /// The source configuration for cloud flows receiving a stream from a bridge.
        public let gatewayBridgeSource: UpdateGatewayBridgeSourceRequest?
        /// The port that the flow listens on for incoming content. If the protocol of the source is Zixi, the port must be set to 2088.
        public let ingestPort: Int?
        /// The maximum bitrate for RIST, RTP, and RTP-FEC streams.
        public let maxBitrate: Int?
        /// The maximum latency in milliseconds. This parameter applies only to RIST-based and Zixi-based streams.
        public let maxLatency: Int?
        /// The size of the buffer (in milliseconds) to use to sync incoming source data.
        public let maxSyncBuffer: Int?
        /// The media stream that is associated with the source, and the parameters for that association.
        public let mediaStreamSourceConfigurations: [MediaStreamSourceConfigurationRequest]?
        /// The minimum latency in milliseconds for SRT-based streams. In streams that use the SRT protocol, this value that you set on your MediaConnect source or output represents the minimal potential latency of that connection. The latency of the stream is set to the highest number between the sender’s minimum latency and the receiver’s minimum latency.
        public let minLatency: Int?
        /// The protocol that the source uses to deliver the content to MediaConnect.   Elemental MediaConnect no longer supports the Fujitsu QoS protocol. This reference is maintained for legacy purposes only.
        public let `protocol`: `Protocol`?
        /// The port that the flow uses to send outbound requests to initiate connection with the sender.
        public let senderControlPort: Int?
        /// The IP address that the flow communicates with to initiate connection with the sender.
        public let senderIpAddress: String?
        /// The ARN of the source that you want to update.
        public let sourceArn: String
        /// The source IP or domain name for SRT-caller protocol.
        public let sourceListenerAddress: String?
        /// Source port for SRT-caller protocol.
        public let sourceListenerPort: Int?
        /// The stream ID that you want to use for this transport. This parameter applies only to Zixi and SRT caller-based streams.
        public let streamId: String?
        /// The name of the VPC interface that you want to send your output to.
        public let vpcInterfaceName: String?
        /// The range of IP addresses that are allowed to contribute content to your source. Format the IP addresses as a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
        public let whitelistCidr: String?

        @inlinable
        public init(decryption: UpdateEncryption? = nil, description: String? = nil, entitlementArn: String? = nil, flowArn: String, gatewayBridgeSource: UpdateGatewayBridgeSourceRequest? = nil, ingestPort: Int? = nil, maxBitrate: Int? = nil, maxLatency: Int? = nil, maxSyncBuffer: Int? = nil, mediaStreamSourceConfigurations: [MediaStreamSourceConfigurationRequest]? = nil, minLatency: Int? = nil, protocol: `Protocol`? = nil, senderControlPort: Int? = nil, senderIpAddress: String? = nil, sourceArn: String, sourceListenerAddress: String? = nil, sourceListenerPort: Int? = nil, streamId: String? = nil, vpcInterfaceName: String? = nil, whitelistCidr: String? = nil) {
            self.decryption = decryption
            self.description = description
            self.entitlementArn = entitlementArn
            self.flowArn = flowArn
            self.gatewayBridgeSource = gatewayBridgeSource
            self.ingestPort = ingestPort
            self.maxBitrate = maxBitrate
            self.maxLatency = maxLatency
            self.maxSyncBuffer = maxSyncBuffer
            self.mediaStreamSourceConfigurations = mediaStreamSourceConfigurations
            self.minLatency = minLatency
            self.`protocol` = `protocol`
            self.senderControlPort = senderControlPort
            self.senderIpAddress = senderIpAddress
            self.sourceArn = sourceArn
            self.sourceListenerAddress = sourceListenerAddress
            self.sourceListenerPort = sourceListenerPort
            self.streamId = streamId
            self.vpcInterfaceName = vpcInterfaceName
            self.whitelistCidr = whitelistCidr
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.decryption, forKey: .decryption)
            try container.encodeIfPresent(self.description, forKey: .description)
            try container.encodeIfPresent(self.entitlementArn, forKey: .entitlementArn)
            request.encodePath(self.flowArn, key: "FlowArn")
            try container.encodeIfPresent(self.gatewayBridgeSource, forKey: .gatewayBridgeSource)
            try container.encodeIfPresent(self.ingestPort, forKey: .ingestPort)
            try container.encodeIfPresent(self.maxBitrate, forKey: .maxBitrate)
            try container.encodeIfPresent(self.maxLatency, forKey: .maxLatency)
            try container.encodeIfPresent(self.maxSyncBuffer, forKey: .maxSyncBuffer)
            try container.encodeIfPresent(self.mediaStreamSourceConfigurations, forKey: .mediaStreamSourceConfigurations)
            try container.encodeIfPresent(self.minLatency, forKey: .minLatency)
            try container.encodeIfPresent(self.`protocol`, forKey: .`protocol`)
            try container.encodeIfPresent(self.senderControlPort, forKey: .senderControlPort)
            try container.encodeIfPresent(self.senderIpAddress, forKey: .senderIpAddress)
            request.encodePath(self.sourceArn, key: "SourceArn")
            try container.encodeIfPresent(self.sourceListenerAddress, forKey: .sourceListenerAddress)
            try container.encodeIfPresent(self.sourceListenerPort, forKey: .sourceListenerPort)
            try container.encodeIfPresent(self.streamId, forKey: .streamId)
            try container.encodeIfPresent(self.vpcInterfaceName, forKey: .vpcInterfaceName)
            try container.encodeIfPresent(self.whitelistCidr, forKey: .whitelistCidr)
        }

        private enum CodingKeys: String, CodingKey {
            case decryption = "decryption"
            case description = "description"
            case entitlementArn = "entitlementArn"
            case gatewayBridgeSource = "gatewayBridgeSource"
            case ingestPort = "ingestPort"
            case maxBitrate = "maxBitrate"
            case maxLatency = "maxLatency"
            case maxSyncBuffer = "maxSyncBuffer"
            case mediaStreamSourceConfigurations = "mediaStreamSourceConfigurations"
            case minLatency = "minLatency"
            case `protocol` = "protocol"
            case senderControlPort = "senderControlPort"
            case senderIpAddress = "senderIpAddress"
            case sourceListenerAddress = "sourceListenerAddress"
            case sourceListenerPort = "sourceListenerPort"
            case streamId = "streamId"
            case vpcInterfaceName = "vpcInterfaceName"
            case whitelistCidr = "whitelistCidr"
        }
    }

    public struct UpdateFlowSourceResponse: AWSDecodableShape {
        /// The ARN of the flow that you was updated.
        public let flowArn: String?
        /// The details of the sources that are assigned to the flow.
        public let source: Source?

        @inlinable
        public init(flowArn: String? = nil, source: Source? = nil) {
            self.flowArn = flowArn
            self.source = source
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case source = "source"
        }
    }

    public struct UpdateGatewayBridgeSourceRequest: AWSEncodableShape {
        ///  The ARN of the bridge feeding this flow.
        public let bridgeArn: String?
        ///  The name of the VPC interface attachment to use for this bridge source.
        public let vpcInterfaceAttachment: VpcInterfaceAttachment?

        @inlinable
        public init(bridgeArn: String? = nil, vpcInterfaceAttachment: VpcInterfaceAttachment? = nil) {
            self.bridgeArn = bridgeArn
            self.vpcInterfaceAttachment = vpcInterfaceAttachment
        }

        private enum CodingKeys: String, CodingKey {
            case bridgeArn = "bridgeArn"
            case vpcInterfaceAttachment = "vpcInterfaceAttachment"
        }
    }

    public struct UpdateGatewayInstanceRequest: AWSEncodableShape {
        /// The state of the instance. ACTIVE or INACTIVE.
        public let bridgePlacement: BridgePlacement?
        /// The Amazon Resource Name (ARN) of the gateway instance that you want to update.
        public let gatewayInstanceArn: String

        @inlinable
        public init(bridgePlacement: BridgePlacement? = nil, gatewayInstanceArn: String) {
            self.bridgePlacement = bridgePlacement
            self.gatewayInstanceArn = gatewayInstanceArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.bridgePlacement, forKey: .bridgePlacement)
            request.encodePath(self.gatewayInstanceArn, key: "GatewayInstanceArn")
        }

        private enum CodingKeys: String, CodingKey {
            case bridgePlacement = "bridgePlacement"
        }
    }

    public struct UpdateGatewayInstanceResponse: AWSDecodableShape {
        /// The state of the instance. ACTIVE or INACTIVE.
        public let bridgePlacement: BridgePlacement?
        /// The ARN of the instance that was updated.
        public let gatewayInstanceArn: String?

        @inlinable
        public init(bridgePlacement: BridgePlacement? = nil, gatewayInstanceArn: String? = nil) {
            self.bridgePlacement = bridgePlacement
            self.gatewayInstanceArn = gatewayInstanceArn
        }

        private enum CodingKeys: String, CodingKey {
            case bridgePlacement = "bridgePlacement"
            case gatewayInstanceArn = "gatewayInstanceArn"
        }
    }

    public struct UpdateIngressGatewayBridgeRequest: AWSEncodableShape {
        ///  The maximum expected bitrate (in bps).
        public let maxBitrate: Int?
        ///  The maximum number of expected outputs.
        public let maxOutputs: Int?

        @inlinable
        public init(maxBitrate: Int? = nil, maxOutputs: Int? = nil) {
            self.maxBitrate = maxBitrate
            self.maxOutputs = maxOutputs
        }

        private enum CodingKeys: String, CodingKey {
            case maxBitrate = "maxBitrate"
            case maxOutputs = "maxOutputs"
        }
    }

    public struct UpdateMaintenance: AWSEncodableShape {
        ///  A day of a week when the maintenance will happen.
        public let maintenanceDay: MaintenanceDay?
        ///  A scheduled date in ISO UTC format when the maintenance will happen. Use YYYY-MM-DD format. Example: 2021-01-30.
        public let maintenanceScheduledDate: String?
        ///  UTC time when the maintenance will happen. Use 24-hour HH:MM format. Minutes must be 00. Example: 13:00. The default value is 02:00.
        public let maintenanceStartHour: String?

        @inlinable
        public init(maintenanceDay: MaintenanceDay? = nil, maintenanceScheduledDate: String? = nil, maintenanceStartHour: String? = nil) {
            self.maintenanceDay = maintenanceDay
            self.maintenanceScheduledDate = maintenanceScheduledDate
            self.maintenanceStartHour = maintenanceStartHour
        }

        private enum CodingKeys: String, CodingKey {
            case maintenanceDay = "maintenanceDay"
            case maintenanceScheduledDate = "maintenanceScheduledDate"
            case maintenanceStartHour = "maintenanceStartHour"
        }
    }

    public struct VideoMonitoringSetting: AWSEncodableShape & AWSDecodableShape {
        /// Detects video frames that are black.
        public let blackFrames: BlackFrames?
        /// Detects video frames that have not changed.
        public let frozenFrames: FrozenFrames?

        @inlinable
        public init(blackFrames: BlackFrames? = nil, frozenFrames: FrozenFrames? = nil) {
            self.blackFrames = blackFrames
            self.frozenFrames = frozenFrames
        }

        private enum CodingKeys: String, CodingKey {
            case blackFrames = "blackFrames"
            case frozenFrames = "frozenFrames"
        }
    }

    public struct VpcInterface: AWSDecodableShape {
        ///  Immutable and has to be a unique against other VpcInterfaces in this Flow.
        public let name: String?
        ///  IDs of the network interfaces created in customer's account by MediaConnect.
        public let networkInterfaceIds: [String]?
        ///  The type of network interface.
        public let networkInterfaceType: NetworkInterfaceType?
        ///  A role Arn MediaConnect can assume to create ENIs in your account.
        public let roleArn: String?
        ///  Security Group IDs to be used on ENI.
        public let securityGroupIds: [String]?
        ///  Subnet must be in the AZ of the Flow.
        public let subnetId: String?

        @inlinable
        public init(name: String? = nil, networkInterfaceIds: [String]? = nil, networkInterfaceType: NetworkInterfaceType? = nil, roleArn: String? = nil, securityGroupIds: [String]? = nil, subnetId: String? = nil) {
            self.name = name
            self.networkInterfaceIds = networkInterfaceIds
            self.networkInterfaceType = networkInterfaceType
            self.roleArn = roleArn
            self.securityGroupIds = securityGroupIds
            self.subnetId = subnetId
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case networkInterfaceIds = "networkInterfaceIds"
            case networkInterfaceType = "networkInterfaceType"
            case roleArn = "roleArn"
            case securityGroupIds = "securityGroupIds"
            case subnetId = "subnetId"
        }
    }

    public struct VpcInterfaceAttachment: AWSEncodableShape & AWSDecodableShape {
        ///  The name of the VPC interface to use for this resource.
        public let vpcInterfaceName: String?

        @inlinable
        public init(vpcInterfaceName: String? = nil) {
            self.vpcInterfaceName = vpcInterfaceName
        }

        private enum CodingKeys: String, CodingKey {
            case vpcInterfaceName = "vpcInterfaceName"
        }
    }

    public struct VpcInterfaceRequest: AWSEncodableShape {
        /// The name for the VPC interface. This name must be unique within the flow.
        public let name: String?
        /// The type of network interface.
        public let networkInterfaceType: NetworkInterfaceType?
        /// The Amazon Resource Name (ARN) of the role that you created when you set up MediaConnect as a trusted service.
        public let roleArn: String?
        /// A virtual firewall to control inbound and outbound traffic.
        public let securityGroupIds: [String]?
        ///  The subnet IDs that you want to use for your VPC interface. A range of IP addresses in your VPC. When you create your VPC, you specify a range of IPv4 addresses for the VPC in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16. This is the primary CIDR block for your VPC. When you create a subnet for your VPC, you specify the CIDR block for the subnet, which is a subset of the VPC CIDR block. The subnets that you use across all VPC interfaces on the flow must be in the same Availability Zone as the flow.
        public let subnetId: String?
        ///  The key-value pairs that can be used to tag and organize the VPC network interface.
        public let vpcInterfaceTags: [String: String]?

        @inlinable
        public init(name: String? = nil, networkInterfaceType: NetworkInterfaceType? = nil, roleArn: String? = nil, securityGroupIds: [String]? = nil, subnetId: String? = nil, vpcInterfaceTags: [String: String]? = nil) {
            self.name = name
            self.networkInterfaceType = networkInterfaceType
            self.roleArn = roleArn
            self.securityGroupIds = securityGroupIds
            self.subnetId = subnetId
            self.vpcInterfaceTags = vpcInterfaceTags
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case networkInterfaceType = "networkInterfaceType"
            case roleArn = "roleArn"
            case securityGroupIds = "securityGroupIds"
            case subnetId = "subnetId"
            case vpcInterfaceTags = "vpcInterfaceTags"
        }
    }
}

// MARK: - Errors

/// Error enum for MediaConnect
public struct MediaConnectErrorType: AWSErrorType {
    enum Code: String {
        case addFlowOutputs420Exception = "AddFlowOutputs420Exception"
        case badRequestException = "BadRequestException"
        case conflictException = "ConflictException"
        case createBridge420Exception = "CreateBridge420Exception"
        case createFlow420Exception = "CreateFlow420Exception"
        case createGateway420Exception = "CreateGateway420Exception"
        case forbiddenException = "ForbiddenException"
        case grantFlowEntitlements420Exception = "GrantFlowEntitlements420Exception"
        case internalServerErrorException = "InternalServerErrorException"
        case notFoundException = "NotFoundException"
        case serviceUnavailableException = "ServiceUnavailableException"
        case tooManyRequestsException = "TooManyRequestsException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize MediaConnect
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// Exception raised by Elemental MediaConnect when adding the flow output. See the error message for the operation for more information on the cause of this exception.
    public static var addFlowOutputs420Exception: Self { .init(.addFlowOutputs420Exception) }
    /// This exception is thrown if the request contains a semantic error. The precise meaning depends on the API, and is documented in the error message.
    public static var badRequestException: Self { .init(.badRequestException) }
    /// The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.
    public static var conflictException: Self { .init(.conflictException) }
    /// Exception raised by Elemental MediaConnect when creating the bridge. See the error message for the operation for more information on the cause of this exception.
    public static var createBridge420Exception: Self { .init(.createBridge420Exception) }
    /// Exception raised by Elemental MediaConnect when creating the flow. See the error message for the operation for more information on the cause of this exception.
    public static var createFlow420Exception: Self { .init(.createFlow420Exception) }
    /// Exception raised by Elemental MediaConnect when creating the gateway. See the error message for the operation for more information on the cause of this exception.
    public static var createGateway420Exception: Self { .init(.createGateway420Exception) }
    /// You do not have sufficient access to perform this action.
    public static var forbiddenException: Self { .init(.forbiddenException) }
    /// Exception raised by Elemental MediaConnect when granting the entitlement. See the error message for the operation for more information on the cause of this exception.
    public static var grantFlowEntitlements420Exception: Self { .init(.grantFlowEntitlements420Exception) }
    /// The server encountered an internal error and is unable to complete the request.
    public static var internalServerErrorException: Self { .init(.internalServerErrorException) }
    /// One or more of the resources in the request does not exist in the system.
    public static var notFoundException: Self { .init(.notFoundException) }
    /// The service is currently unavailable or busy.
    public static var serviceUnavailableException: Self { .init(.serviceUnavailableException) }
    /// The request was denied due to request throttling.
    public static var tooManyRequestsException: Self { .init(.tooManyRequestsException) }
}

extension MediaConnectErrorType: Equatable {
    public static func == (lhs: MediaConnectErrorType, rhs: MediaConnectErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension MediaConnectErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
